Javascript file in theme does not get loaded
In drupal 8 my theme uses the file main.js. If my theme was called test I would add the file in this order. 

File location:

test/js/main.js


In test.info.yml:

libraries:
  - test/global-js
  - test/global-css


In libraries.yml:

global-js:
  js:
    js/main.js: {}
global-css:
  css:
    theme:
      css/styles.css: {}


Remember your spacing in the .yml files (2 spaces).
also read adding stylesheets and javascript to a drupal 8 theme andCreating a drupal 8 sub-theme, or sub-theme of sub-theme

Happy Drupaling