Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update scenario-tester #1714

Merged
merged 2 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"broccoli-node-api": "^1.7.0",
"code-equality-assertions": "^0.9.0",
"ember-engines": "^0.8.19",
"scenario-tester": "^2.1.2",
"scenario-tester": "^3.0.1",
"typescript": "^5.1.6"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/macros/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@types/semver": "^7.3.6",
"babel-plugin-ember-template-compilation": "^2.1.1",
"code-equality-assertions": "^0.9.0",
"scenario-tester": "^2.1.2",
"scenario-tester": "^3.0.1",
"typescript": "^5.1.6"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/macros/tests/babel/dependency-satisfies.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe(`dependencySatisfies`, function () {
allBabelVersions({
includePresetsTests: true,
babelConfig() {
project.writeSync();
project.write();
let config = MacrosConfig.for({}, project.baseDir);
config.finalize();
return {
Expand Down Expand Up @@ -141,7 +141,7 @@ describe(`dependencySatisfies`, function () {
import { dependencySatisfies } from '@embroider/macros';

export default function() {
return {
return {
// specified in dependencies
util: dependencySatisfies('@embroider/util', '*'),

Expand Down
2 changes: 1 addition & 1 deletion packages/macros/tests/babel/macro-condition.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('macroCondition', function () {
beforeAll(() => {
project = new Project('test-app');
project.addDependency('qunit', '2.0.0');
project.writeSync();
project.write();
filename = join(project.baseDir, 'sample.js');
});

Expand Down
4 changes: 2 additions & 2 deletions packages/macros/tests/glimmer/dependency-satisfies.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ describe('dependency satisfies', () => {
let project: Project;
let filename: string;

beforeAll(() => {
beforeAll(async () => {
project = new Project('app');
project.addDependency('qunit', '2.9.1');
project.addDependency('foo', '1.1.0-beta.1');
project.writeSync();
await project.write();
filename = join(project.baseDir, 'sample.js');
});

Expand Down
8 changes: 4 additions & 4 deletions packages/macros/tests/glimmer/macro-condition.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,21 @@ describe(`macroCondition`, function () {
expect(code).toMatch(/\{\{my-assertion undefined\}\}/);
});

test('macroCondition composes with other macros, true case', function () {
test('macroCondition composes with other macros, true case', async function () {
project = new Project('app');
project.addDependency('ember-source', '3.1.2');
project.writeSync();
await project.write();
let code = transform(
`{{my-assertion (if (macroCondition (macroDependencySatisfies 'ember-source' '3.x')) 'red' 'blue') }}`,
{ filename: join(project.baseDir, 'sample.js') }
);
expect(code).toMatch(/\{\{my-assertion ["']red["']\}\}/);
});

test('macroCondition composes with other macros, false case', function () {
test('macroCondition composes with other macros, false case', async function () {
project = new Project('app');
project.addDependency('ember-source', '3.1.2');
project.writeSync();
await project.write();
let code = transform(
`{{my-assertion (if (macroCondition (macroDependencySatisfies 'ember-source' '10.x')) 'red' 'blue') }}`,
{ filename: join(project.baseDir, 'sample.js') }
Expand Down
52 changes: 34 additions & 18 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading