Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklx committed Jun 25, 2024
1 parent 1fade50 commit 2761187
Show file tree
Hide file tree
Showing 5 changed files with 5,132 additions and 6,636 deletions.
26 changes: 13 additions & 13 deletions __tests__/tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1468,7 +1468,7 @@ describe('htmlbars-inline-precompile', function () {
import { precompileTemplate } from "@ember/template-compilation";
import { setComponentTemplate } from "@ember/component";
import templateOnly from "@ember/component/template-only";
export default setComponentTemplate(precompileTemplate('<HelloWorld @color={{"#ff0000"}} />', { scope: () => ({ HelloWorld }), strictMode: true }), templateOnly());
export default setComponentTemplate(precompileTemplate('<HelloWorld @color={{"#ff0000"}} />', { scope: () => ({ HelloWorld }), strictMode: true }), templateOnly(undefined, "foo-bar"));
`);
});

Expand Down Expand Up @@ -1599,7 +1599,7 @@ describe('htmlbars-inline-precompile', function () {
precompileTemplate("Icon", {
strictMode: true,
}),
templateOnly()
templateOnly(undefined, "Icon")
);
`);
});
Expand All @@ -1626,7 +1626,7 @@ describe('htmlbars-inline-precompile', function () {
import { precompileTemplate } from "@ember/template-compilation";
import { setComponentTemplate } from "@ember/component";
import templateOnly from "@ember/component/template-only";
export default setComponentTemplate(precompileTemplate('<HelloWorld />', { strictMode: false, scope: () => ({ HelloWorld }) }), templateOnly());
export default setComponentTemplate(precompileTemplate('<HelloWorld />', { strictMode: false, scope: () => ({ HelloWorld }) }), templateOnly(undefined, "foo-bar"));
`);
});
});
Expand Down Expand Up @@ -1698,7 +1698,7 @@ describe('htmlbars-inline-precompile', function () {
scope: () => [HelloWorld],
isStrictMode: true,
}
), templateOnly());
), templateOnly(undefined, "foo-bar"));
`);
});

Expand Down Expand Up @@ -1897,7 +1897,7 @@ describe('htmlbars-inline-precompile', function () {
import { precompileTemplate } from "@ember/template-compilation";
import { setComponentTemplate } from "@ember/component";
import templateOnly from "@ember/component/template-only";
export default setComponentTemplate(precompileTemplate('<HelloWorld />', { strictMode: true, scope: () => ({ HelloWorld }) }), templateOnly());
export default setComponentTemplate(precompileTemplate('<HelloWorld />', { strictMode: true, scope: () => ({ HelloWorld }) }), templateOnly(undefined, "foo-bar"));
`);
});

Expand Down Expand Up @@ -1928,7 +1928,7 @@ describe('htmlbars-inline-precompile', function () {
import { setComponentTemplate } from "@ember/component";
import templateOnly from "@ember/component/template-only";
let div = 1;
export default setComponentTemplate(precompileTemplate('<div></div>', { strictMode: true, scope: () => ({ div })}), templateOnly());
export default setComponentTemplate(precompileTemplate('<div></div>', { strictMode: true, scope: () => ({ div })}), templateOnly(undefined, "foo-bar"));
`);
});

Expand All @@ -1955,7 +1955,7 @@ describe('htmlbars-inline-precompile', function () {
import { setComponentTemplate } from "@ember/component";
import templateOnly from "@ember/component/template-only";
let hasBlock = 1;
export default setComponentTemplate(precompileTemplate('{{hasBlock "thing"}}', { strictMode: true, scope: () => ({ hasBlock }) }), templateOnly());
export default setComponentTemplate(precompileTemplate('{{hasBlock "thing"}}', { strictMode: true, scope: () => ({ hasBlock }) }), templateOnly(undefined, "foo-bar"));
`);
});

Expand All @@ -1980,7 +1980,7 @@ describe('htmlbars-inline-precompile', function () {
import { precompileTemplate } from "@ember/template-compilation";
import { setComponentTemplate } from "@ember/component";
import templateOnly from "@ember/component/template-only";
export default setComponentTemplate(precompileTemplate('{{hasBlock "thing"}}', { strictMode: true }), templateOnly());
export default setComponentTemplate(precompileTemplate('{{hasBlock "thing"}}', { strictMode: true }), templateOnly(undefined, "foo-bar"));
`);
});

Expand Down Expand Up @@ -2020,7 +2020,7 @@ describe('htmlbars-inline-precompile', function () {
isStrictMode: true,
}
),
templateOnly()
templateOnly(undefined, "foo-bar")
);
`);
});
Expand Down Expand Up @@ -2049,7 +2049,7 @@ describe('htmlbars-inline-precompile', function () {
import { precompileTemplate } from "@ember/template-compilation";
import { setComponentTemplate } from "@ember/component";
import templateOnly from "@ember/component/template-only";
export default setComponentTemplate(precompileTemplate('<HelloWorld />', { strictMode: true, scope: () => ({ HelloWorld }) }), templateOnly());
export default setComponentTemplate(precompileTemplate('<HelloWorld />', { strictMode: true, scope: () => ({ HelloWorld }) }), templateOnly(undefined, "foo-bar"));
`);
});

Expand Down Expand Up @@ -2081,7 +2081,7 @@ describe('htmlbars-inline-precompile', function () {
import templateOnly from "@ember/component/template-only";
export default function() {
let { HelloWorld } = globalThis;
return setComponentTemplate(precompileTemplate('<HelloWorld />', { strictMode: true, scope: () => ({ HelloWorld })}), templateOnly());
return setComponentTemplate(precompileTemplate('<HelloWorld />', { strictMode: true, scope: () => ({ HelloWorld })}), templateOnly(undefined, undefined));
}
`);
});
Expand Down Expand Up @@ -2133,7 +2133,7 @@ describe('htmlbars-inline-precompile', function () {
isStrictMode: true,
}
),
templateOnly()
templateOnly(undefined, "foo-bar")
);
`);
});
Expand Down Expand Up @@ -2166,7 +2166,7 @@ describe('htmlbars-inline-precompile', function () {
import { precompileTemplate } from "@ember/template-compilation";
import { setComponentTemplate } from "@ember/component";
import templateOnly from "@ember/component/template-only";
const MyComponent = setComponentTemplate(precompileTemplate('<HelloWorld />', { strictMode: true, scope: () => ({ HelloWorld }) }), templateOnly());
const MyComponent = setComponentTemplate(precompileTemplate('<HelloWorld />', { strictMode: true, scope: () => ({ HelloWorld }) }), templateOnly(undefined, "MyComponent"));
`);
});

Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,23 @@
"@types/jest": "^29.2.3",
"@types/node": "^20.5.7",
"@types/sinon": "^10.0.13",
"@typescript-eslint/eslint-plugin": "^4.28.4",
"@typescript-eslint/parser": "^4.28.4",
"@typescript-eslint/eslint-plugin": "^7.14.1",
"@typescript-eslint/parser": "^7.14.1",
"code-equality-assertions": "^0.7.0",
"common-tags": "^1.8.0",
"content-tag": "^0.1.0",
"ember-source": "^3.28.9",
"eslint": "^6.8.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-prettier": "^5.1.3",
"jest": "^29.3.1",
"prettier": "^2.2.1",
"prettier": "^3.3.2",
"release-it": "^14.10.0",
"release-it-lerna-changelog": "^3.1.0",
"release-plan": "^0.9.0",
"sinon": "^14.0.0",
"typescript": "^4.3.5"
"typescript": "^5.5.2"
},
"packageManager": "[email protected]",
"engines": {
Expand Down
Loading

0 comments on commit 2761187

Please sign in to comment.