Skip to content

Commit 2761187

Browse files
committed
fix tests
1 parent 1fade50 commit 2761187

File tree

5 files changed

+5132
-6636
lines changed

5 files changed

+5132
-6636
lines changed

__tests__/tests.ts

+13-13
Original file line numberDiff line numberDiff line change
@@ -1468,7 +1468,7 @@ describe('htmlbars-inline-precompile', function () {
14681468
import { precompileTemplate } from "@ember/template-compilation";
14691469
import { setComponentTemplate } from "@ember/component";
14701470
import templateOnly from "@ember/component/template-only";
1471-
export default setComponentTemplate(precompileTemplate('<HelloWorld @color={{"#ff0000"}} />', { scope: () => ({ HelloWorld }), strictMode: true }), templateOnly());
1471+
export default setComponentTemplate(precompileTemplate('<HelloWorld @color={{"#ff0000"}} />', { scope: () => ({ HelloWorld }), strictMode: true }), templateOnly(undefined, "foo-bar"));
14721472
`);
14731473
});
14741474

@@ -1599,7 +1599,7 @@ describe('htmlbars-inline-precompile', function () {
15991599
precompileTemplate("Icon", {
16001600
strictMode: true,
16011601
}),
1602-
templateOnly()
1602+
templateOnly(undefined, "Icon")
16031603
);
16041604
`);
16051605
});
@@ -1626,7 +1626,7 @@ describe('htmlbars-inline-precompile', function () {
16261626
import { precompileTemplate } from "@ember/template-compilation";
16271627
import { setComponentTemplate } from "@ember/component";
16281628
import templateOnly from "@ember/component/template-only";
1629-
export default setComponentTemplate(precompileTemplate('<HelloWorld />', { strictMode: false, scope: () => ({ HelloWorld }) }), templateOnly());
1629+
export default setComponentTemplate(precompileTemplate('<HelloWorld />', { strictMode: false, scope: () => ({ HelloWorld }) }), templateOnly(undefined, "foo-bar"));
16301630
`);
16311631
});
16321632
});
@@ -1698,7 +1698,7 @@ describe('htmlbars-inline-precompile', function () {
16981698
scope: () => [HelloWorld],
16991699
isStrictMode: true,
17001700
}
1701-
), templateOnly());
1701+
), templateOnly(undefined, "foo-bar"));
17021702
`);
17031703
});
17041704

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

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

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

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

@@ -2020,7 +2020,7 @@ describe('htmlbars-inline-precompile', function () {
20202020
isStrictMode: true,
20212021
}
20222022
),
2023-
templateOnly()
2023+
templateOnly(undefined, "foo-bar")
20242024
);
20252025
`);
20262026
});
@@ -2049,7 +2049,7 @@ describe('htmlbars-inline-precompile', function () {
20492049
import { precompileTemplate } from "@ember/template-compilation";
20502050
import { setComponentTemplate } from "@ember/component";
20512051
import templateOnly from "@ember/component/template-only";
2052-
export default setComponentTemplate(precompileTemplate('<HelloWorld />', { strictMode: true, scope: () => ({ HelloWorld }) }), templateOnly());
2052+
export default setComponentTemplate(precompileTemplate('<HelloWorld />', { strictMode: true, scope: () => ({ HelloWorld }) }), templateOnly(undefined, "foo-bar"));
20532053
`);
20542054
});
20552055

@@ -2081,7 +2081,7 @@ describe('htmlbars-inline-precompile', function () {
20812081
import templateOnly from "@ember/component/template-only";
20822082
export default function() {
20832083
let { HelloWorld } = globalThis;
2084-
return setComponentTemplate(precompileTemplate('<HelloWorld />', { strictMode: true, scope: () => ({ HelloWorld })}), templateOnly());
2084+
return setComponentTemplate(precompileTemplate('<HelloWorld />', { strictMode: true, scope: () => ({ HelloWorld })}), templateOnly(undefined, undefined));
20852085
}
20862086
`);
20872087
});
@@ -2133,7 +2133,7 @@ describe('htmlbars-inline-precompile', function () {
21332133
isStrictMode: true,
21342134
}
21352135
),
2136-
templateOnly()
2136+
templateOnly(undefined, "foo-bar")
21372137
);
21382138
`);
21392139
});
@@ -2166,7 +2166,7 @@ describe('htmlbars-inline-precompile', function () {
21662166
import { precompileTemplate } from "@ember/template-compilation";
21672167
import { setComponentTemplate } from "@ember/component";
21682168
import templateOnly from "@ember/component/template-only";
2169-
const MyComponent = setComponentTemplate(precompileTemplate('<HelloWorld />', { strictMode: true, scope: () => ({ HelloWorld }) }), templateOnly());
2169+
const MyComponent = setComponentTemplate(precompileTemplate('<HelloWorld />', { strictMode: true, scope: () => ({ HelloWorld }) }), templateOnly(undefined, "MyComponent"));
21702170
`);
21712171
});
21722172

package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -50,23 +50,23 @@
5050
"@types/jest": "^29.2.3",
5151
"@types/node": "^20.5.7",
5252
"@types/sinon": "^10.0.13",
53-
"@typescript-eslint/eslint-plugin": "^4.28.4",
54-
"@typescript-eslint/parser": "^4.28.4",
53+
"@typescript-eslint/eslint-plugin": "^7.14.1",
54+
"@typescript-eslint/parser": "^7.14.1",
5555
"code-equality-assertions": "^0.7.0",
5656
"common-tags": "^1.8.0",
5757
"content-tag": "^0.1.0",
5858
"ember-source": "^3.28.9",
59-
"eslint": "^6.8.0",
59+
"eslint": "^8.57.0",
6060
"eslint-config-prettier": "^6.15.0",
6161
"eslint-plugin-node": "^11.1.0",
62-
"eslint-plugin-prettier": "^3.4.0",
62+
"eslint-plugin-prettier": "^5.1.3",
6363
"jest": "^29.3.1",
64-
"prettier": "^2.2.1",
64+
"prettier": "^3.3.2",
6565
"release-it": "^14.10.0",
6666
"release-it-lerna-changelog": "^3.1.0",
6767
"release-plan": "^0.9.0",
6868
"sinon": "^14.0.0",
69-
"typescript": "^4.3.5"
69+
"typescript": "^5.5.2"
7070
},
7171
"packageManager": "pnpm@9.0.6",
7272
"engines": {

0 commit comments

Comments
 (0)