Skip to content

Commit

Permalink
Merge pull request #305 from kaliber5/embroider-tests
Browse files Browse the repository at this point in the history
Use @embroider/test-setup for embroider tests
  • Loading branch information
simonihmig authored Jan 18, 2021
2 parents 82dcb07 + 350c6be commit 6bd6458
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 18 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ jobs:
- ember-canary
- ember-default-with-jquery
- ember-classic
- embroider
- embroider-safe
- embroider-optimized
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand Down
13 changes: 3 additions & 10 deletions config/ember-try.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

const getChannelURL = require('ember-source-channel-url');
const { embroiderSafe, embroiderOptimized } = require('@embroider/test-setup');

module.exports = async function () {
return {
Expand Down Expand Up @@ -82,16 +83,8 @@ module.exports = async function () {
},
},
},
{
name: 'embroider',
npm: {
devDependencies: {
'@embroider/core': '*',
'@embroider/webpack': '*',
'@embroider/compat': '*',
},
},
},
embroiderSafe(),
embroiderOptimized(),
],
};
};
9 changes: 2 additions & 7 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ module.exports = function (defaults) {
behave. You most likely want to be modifying `./index.js` or app's build file
*/

if ('@embroider/webpack' in app.dependencies()) {
const { Webpack } = require('@embroider/webpack'); // eslint-disable-line node/no-missing-require
return require('@embroider/compat') // eslint-disable-line node/no-missing-require
.compatBuild(app, Webpack);
} else {
return app.toTree();
}
const { maybeEmbroider } = require('@embroider/test-setup');
return maybeEmbroider(app);
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"devDependencies": {
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.1.4",
"@embroider/test-setup": "^0.35.1",
"@glimmer/component": "^1.0.3",
"@glimmer/tracking": "^1.0.3",
"babel-eslint": "^10.1.0",
Expand Down
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1325,6 +1325,14 @@
resolve "^1.8.1"
semver "^7.3.2"

"@embroider/test-setup@^0.35.1":
version "0.35.1"
resolved "https://registry.yarnpkg.com/@embroider/test-setup/-/test-setup-0.35.1.tgz#34999b383aa7ab4bcd7c30c7e26c1ca970fc074a"
integrity sha512-QXXKmPZp91ge/3KCLSbDzV35K05NZqMNZEnHc1XIcJcAb3tbmcN5nPk+hzV4PIT685FcvTIk60aw+dy1FJ0kNw==
dependencies:
lodash "^4.17.20"
resolve "^1.17.0"

"@eslint/eslintrc@^0.3.0":
version "0.3.0"
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.3.0.tgz#d736d6963d7003b6514e6324bec9c602ac340318"
Expand Down

0 comments on commit 6bd6458

Please sign in to comment.