Skip to content

Commit

Permalink
stop relying on typescript build of scenarios in the scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
mansona committed Jul 23, 2024
1 parent 91e3380 commit 3e62d9a
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions tests/scenarios/compat-plugin-hints-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import { join } from 'path';
import QUnit from 'qunit';
const { module: Qmodule, test } = QUnit;

export function samplePlugin() {
return { visitor: {} };
}

appScenarios
.map('compat-plugin-hints', app => {
app.files['ember-cli-build.js'] = `
app.mergeFiles({
'sample-plugin.js': `module.exports.samplePlugin = function samplePlugin() {
return { visitor: {} };
}`,
'ember-cli-build.js': `
'use strict';
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
Expand All @@ -25,7 +25,7 @@ appScenarios
babel: {
plugins: [
// deliberately non-serializable form
require("${__filename.replace(/\\/g, '/').replace(/\.ts$/, '.js')}").samplePlugin
require(__dirname + '/sample-plugin.js').samplePlugin
]
}
});
Expand All @@ -38,13 +38,14 @@ appScenarios
],
pluginHints: [
{
resolve: ["${__filename.replace(/\\/g, '/').replace(/\.ts$/, '.js')}"],
resolve: [__dirname + '/sample-plugin.js'],
useMethod: 'samplePlugin',
},
],
});
};
`;
`,
});
})
.forEachScenario(scenario => {
Qmodule(scenario.name, function (hooks) {
Expand Down

0 comments on commit 3e62d9a

Please sign in to comment.