Skip to content

Commit 8260dd1

Browse files
committed
this way of testing makes much more sense
1 parent c667aa4 commit 8260dd1

15 files changed

Lines changed: 130 additions & 91 deletions

transforms/no-implicit-this/__testfixtures__/-mock-telemetry.json

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,30 @@
1414
"foos"
1515
]
1616
},
17-
"component-invocation.input": {
17+
"built-in-helpers.input": {
1818
"type": "Component",
19-
"computedProperties": ["ab", "records", "varisalsoacomponent"],
20-
"ownProperties": ["property"],
19+
"computedProperties": ["foo", "records"],
2120
"ownActions": ["myAction"]
2221
},
23-
"controller-property.input": {
24-
"type": "Controller",
25-
"computedProperties": ["model", "controllerProp"],
26-
"ownActions": ["actionName"]
22+
"handlebars-with-positional-params.input": {
23+
"type": "Component",
24+
"computedProperties": ["foo", "property"],
25+
"ownActions": ["myAction"]
26+
},
27+
"handlebars-with-hash-params.input": {
28+
"type": "Component",
29+
"computedProperties": ["foo", "property"],
30+
"ownActions": ["myAction"]
31+
},
32+
"handlebars-with-block-params.input": {
33+
"type": "Component",
34+
"computedProperties": ["foo", "property"]
35+
},
36+
"handlebars-without-params.input": {
37+
"type": "Component",
38+
"computedProperties": ["foo", "property"]
2739
},
40+
"my-helper": { "type": "Helper" },
2841
"a-helper": { "type": "Helper" },
2942
"unescaped": { "type": "Helper" },
3043
"someting": { "type": "Helper" },
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{{debugger}}
2+
{{has-block}}
3+
{{hasBlock}}
4+
{{input}}
5+
{{outlet}}
6+
{{textarea}}
7+
{{yield}}
8+
9+
{{#let (concat "a" "b") as |ab|}}
10+
{{ab}}
11+
{{/let}}
12+
13+
{{#each records as |record|}}
14+
{{record.property}}
15+
{{/each}}
16+
17+
18+
<button {{on 'click' myAction}}>Action</button>
19+
<button {{on 'click' (fn myAction foo)}}>Action</button>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{{debugger}}
2+
{{has-block}}
3+
{{hasBlock}}
4+
{{input}}
5+
{{outlet}}
6+
{{textarea}}
7+
{{yield}}
8+
9+
{{#let (concat "a" "b") as |ab|}}
10+
{{ab}}
11+
{{/let}}
12+
13+
{{#each this.records as |record|}}
14+
{{record.property}}
15+
{{/each}}
16+
17+
18+
<button {{on 'click' this.myAction}}>Action</button>
19+
<button {{on 'click' (fn this.myAction this.foo)}}>Action</button>

transforms/no-implicit-this/__testfixtures__/component-invocation.input.hbs

Lines changed: 0 additions & 34 deletions
This file was deleted.

transforms/no-implicit-this/__testfixtures__/component-invocation.output.hbs

Lines changed: 0 additions & 34 deletions
This file was deleted.

transforms/no-implicit-this/__testfixtures__/controller-property.input.hbs

Lines changed: 0 additions & 8 deletions
This file was deleted.

transforms/no-implicit-this/__testfixtures__/controller-property.output.hbs

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{{#my-component as |foo myAction hash components|}}
2+
{{foo}} {{myAction}}
3+
{{hash.property}} {{hash.foo}}
4+
5+
{{components.foo}}
6+
7+
{{#components.my-component}}
8+
9+
{{/components.my-component}}
10+
11+
{{#components.block as |block|}}
12+
{{block}}
13+
{{/components.block}}
14+
{{/my-component}}
15+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{{#my-component as |foo myAction hash components|}}
2+
{{foo}} {{myAction}}
3+
{{hash.property}} {{hash.foo}}
4+
5+
{{components.foo}}
6+
7+
{{#components.my-component}}
8+
9+
{{/components.my-component}}
10+
11+
{{#components.block as |block|}}
12+
{{block}}
13+
{{/components.block}}
14+
{{/my-component}}
15+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{{my-component arg="string"}}
2+
{{my-component arg=2}}
3+
{{my-component arg=foo}}
4+
{{my-component arg=property}}
5+
{{my-component arg=(my-helper property)}}
6+
{{my-component arg=(my-helper (fn myAction property) foo)}}
7+
{{my-component arg=property arg2=foo}}
8+
{{my-component arg=property arg2=(fn myAction foo)}}
9+

0 commit comments

Comments
 (0)