We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
this
The codemod should support integration tests making use of the this context.
Iterate per test function in the file:
test
hbs
this.
this.set
render
state.prop1 = this.prop1; ...
const state = new (class { @tracked prop1; @tracked prop2; })();
short, but less readable? OR bit more verbose, but nicer?
class State { @tracked prop1; @tracked prop2; }; const state = new State();
OR, but this complicates the template transform as state.x needs a getter
state.x
const state = new TrackedMap();
const context = this;
const { X, Y } = this;
context
state
state.prop1 = ...
await settled();
@ember/test-helpers
If needed, you can provide more context (e.g. reference materials, screenshots, GIFs) for the request here.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I would like to see... πββοΈπββοΈ
The codemod should support integration tests making use of the
this
context.Why and how π¬
Iterate per
test
function in the file:hbs
helper, then skiphbs
scope semantics are very differentthis.
usages in the hbs template and list themthis.set
usages in the test and list themrender
function, set initial state for every propertystate.prop1 = this.prop1; ...
short, but less readable?
OR bit more verbose, but nicer?
OR, but this complicates the template transform as
state.x
needs a getterrender
, createconst context = this;
const { X, Y } = this;
this
references tocontext
orstate
this.set
expressionsstate.prop1 = ...
await settled();
@ember/test-helpers
if neededAdditional context β
If needed, you can provide more context (e.g. reference materials, screenshots, GIFs) for the request here.
The text was updated successfully, but these errors were encountered: