Skip to content
This repository has been archived by the owner on Jul 14, 2020. It is now read-only.

Commit

Permalink
Add integration tests for all active and maintained components to sho…
Browse files Browse the repository at this point in the history
…w that they can all be bundled correctly with the service (#35)

* Add script to create a list of all components, this will be used in the integration tests

* Add an integration test which checks all components which are active or maintained and have JavaScript are able to be bundled via the JavaScript bunding API endpoint

* use jsdom instead of vm as it gives us all the correct global variables that a real DOM would have

* Make webpack use the .bower.json file if a bower.json does not exist. This is the case when a bower component has been published that has not included it's bower.json file

* Enable the request log to be configurable, so that we can turn the logs off when running tests

* Ignore all o-comment components as they are being rebuilt entirely and currently are written in a way which is not valid browser-based JavaScript

* Add fetch polyfill to enable running the JS bundles inside JSDOM

* Add integration tests for css bundling of all active and maintained components

* fix lint error

* update components.json

* Update webpack-config-bower.js

* Add comment about .bower.json

* Update fetch-components.js

* fix lint issue

* move url construction into a function

* Create function to execute JS in a browser context to make tests more readable

* move repeated code to top of file

* move more repetition to top of file

* make test more readable

* fix tests
  • Loading branch information
JakeChampion authored May 28, 2019
1 parent b0af555 commit 4c0b343
Show file tree
Hide file tree
Showing 7 changed files with 1,102 additions and 130 deletions.
3 changes: 2 additions & 1 deletion lib/webpack-config-bower.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ module.exports = ({
// the order is respected
modules: [path.join(installationDirectory, "bower_components")],
// These JSON files are read in directories
descriptionFiles: ["bower.json"],
// We use `.bower.json` and not `bower.json` because this file is created by Bower for every component that has been installed.
descriptionFiles: [".bower.json"],
// These fields in the description files are looked up when trying to resolve the package directory
mainFields: ["browser", "main"],
// These files are tried when trying to resolve a directory
Expand Down
Loading

0 comments on commit 4c0b343

Please sign in to comment.