Skip to content

Commit

Permalink
Use addon default ember-try (~ish)
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Jun 6, 2023
1 parent 3a56d7f commit a780112
Showing 1 changed file with 4 additions and 41 deletions.
45 changes: 4 additions & 41 deletions addon/tests/dummy/config/ember-try.js
Original file line number Diff line number Diff line change
@@ -1,46 +1,9 @@
'use strict';

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

module.exports = async function () {
const embroiderCore = await latestVersion('@embroider/core');
const embroiderWebpack = await latestVersion('@embroider/webpack');
const embroiderCompat = await latestVersion('@embroider/compat');
const embroiderTestSetup = await latestVersion('@embroider/test-setup');

const embroider = {
safe: {
name: 'embroider-safe',
npm: {
devDependencies: {
'@embroider/core': embroiderCore,
'@embroider/webpack': embroiderWebpack,
'@embroider/compat': embroiderCompat,
'@embroider/test-setup': embroiderTestSetup,
},
},
env: {
EMBROIDER_TEST_SETUP_OPTIONS: 'safe',
},
},

optimized: {
name: 'embroider-optimized',
npm: {
devDependencies: {
'@embroider/core': embroiderCore,
'@embroider/webpack': embroiderWebpack,
'@embroider/compat': embroiderCompat,
'@embroider/test-setup': embroiderTestSetup,
},
},
env: {
EMBROIDER_TEST_SETUP_OPTIONS: 'optimized',
},
},
};

return {
useYarn: true,
scenarios: [
Expand Down Expand Up @@ -92,16 +55,16 @@ module.exports = async function () {
devDependencies: {},
},
},
embroider.safe,
embroiderSafe(),
// disable embroider optimized test scenarios, as the dynamism these
// tests use is not compatible with embroider we are still exploring
// appropriate paths forward.
//
// Steps to re-enable:
//
// 1. have a strategy to make this work
// 1. have a strategy to make this work, import from '@embroider/test-setup'
// 2. uncomment the next line
// embroider.optimized,
// embroiderOptimized();
//
// 3. add "embroider-optimized" to .github/workflows/ci-build.yml's
// ember-try-scenario list.
Expand Down

0 comments on commit a780112

Please sign in to comment.