Skip to content

Commit

Permalink
Failing test for or helper with fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeAstapov committed Sep 7, 2023
1 parent dac1476 commit 6c75383
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ interface Signature {
andArg3: true;
andArg4: { isTruthy: true };
orArg: object;
stringArg: string;
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@
@andArg3={{and true true}}
@andArg4={{and 1 (hash isTruthy=true)}}
@orArg={{or (hash) (array)}}
@stringArg={{or this.maybeString "string"}}
/>
7 changes: 7 additions & 0 deletions packages/modern-test-app/app/components/helpers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Component from '@glimmer/component';

export default class extends Component {
get maybeString(): string | undefined {
return Date.now() === 0 ? 'now has gone' : undefined;
}
}

0 comments on commit 6c75383

Please sign in to comment.