Skip to content

Commit 760e43b

Browse files
committed
Changed import paths
- no extensions - no relative paths - standardized on 'my-app'
1 parent 2e88adf commit 760e43b

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

guides/release/typescript/application-development/testing.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Then our component might be defined like this:
2020
```gts {data-filename="app/components/profile.gts"}
2121
import Component from '@glimmer/component';
2222
import type User from 'app/types/user';
23-
import { randomAvatarURL } from 'app/utils/avatar';
23+
import { randomAvatarURL } from 'my-app/utils/avatar';
2424
2525
interface ProfileSignature {
2626
Args: {
@@ -59,8 +59,8 @@ To test the `Profile` component, we need to set up a `User` on `this` to pass in
5959
import { module, test } from 'qunit';
6060
import { render } from '@ember/test-helpers';
6161
62-
import { setupRenderingTest } from 'app/tests/helpers';
63-
import type User from 'app/types/user';
62+
import { setupRenderingTest } from 'my-app/tests/helpers';
63+
import type User from 'my-app/types/user';
6464
6565
module('Integration | Component | Profile', function (hooks) {
6666
setupRenderingTest(hooks);
@@ -104,7 +104,7 @@ To inform TypeScript about this, we need to tell it that the type of `this` in e
104104

105105
```typescript {data-filename="tests/integration/components/profile.ts"}
106106
import type { TestContext } from '@ember/test-helpers';
107-
import type User from 'app/types/user';
107+
import type User from 'my-app/types/user';
108108

109109
interface Context extends TestContext {
110110
user: User;
@@ -124,8 +124,8 @@ import { module, test } from 'qunit';
124124
import { render } from '@ember/test-helpers';
125125
import type { TestContext } from '@ember/test-helpers';
126126
127-
import { setupRenderingTest } from 'app/tests/helpers';
128-
import type User from 'app/types/user';
127+
import { setupRenderingTest } from 'my-app/tests/helpers';
128+
import type User from 'my-app/types/user';
129129
130130
interface Context extends TestContext {
131131
user: User;
@@ -196,7 +196,7 @@ The test for our function might look something like this:
196196

197197
```javascript {data-filename="tests/unit/utils/math-test.js"}
198198
import { module, test } from 'qunit';
199-
import { add } from 'app/utils/math';
199+
import { add } from 'my-app/utils/math';
200200

201201
module('the `add` function', function (hooks) {
202202
test('adds numbers correctly', function (assert) {
@@ -232,7 +232,7 @@ We can also drop the assertion from our function definition, because the _compil
232232

233233
```typescript {data-filename="tests/unit/utils/math-test.ts"}
234234
import { module, test } from 'qunit';
235-
import { add } from 'app/utils/math';
235+
import { add } from 'my-app/utils/math';
236236

237237
module('the `add` function', function (hooks) {
238238
test('adds numbers correctly', function (assert) {
@@ -266,7 +266,7 @@ Now, in our test file, we're similarly back to testing all those extra scenarios
266266

267267
```typescript {data-filename="tests/unit/utils/math-test.ts"}
268268
import { module, test } from 'qunit';
269-
import { add } from 'app/utils/math';
269+
import { add } from 'my-app/utils/math';
270270

271271
module('the `add` function', function (hooks) {
272272
test('adds numbers correctly', function (assert) {

guides/release/typescript/core-concepts/invokables.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ There, we defined component which accepted a `srcUrl` argument and used a `play-
8484
```gts {data-filename="app/components/audio-player.gts"}
8585
import Component from '@glimmer/component';
8686
import { tracked } from '@glimmer/tracking';
87-
import playWhen from '../modifiers/play-when.ts';
87+
import playWhen from 'my-app/modifiers/play-when';
8888
import { on } from '@ember/modifier';
8989
9090
export default class AudioPlayer extends Component {
@@ -118,7 +118,7 @@ We can define a signature with those `Args` on it and apply it to the component
118118
```gts { data-filename="app/components/audio-player.gts" data-diff="+6,+7,+8,+9,+10,+11,-13,+14" }
119119
import Component from '@glimmer/component';
120120
import { tracked } from '@glimmer/tracking';
121-
import playWhen from '../modifiers/play-when.ts';
121+
import playWhen from 'my-app/modifiers/play-when';
122122
import { on } from '@ember/modifier';
123123
124124
interface AudioPlayerSignature {
@@ -154,7 +154,7 @@ Now, let's expand on this example to give callers the ability to apply attribute
154154
```gts { data-filename="app/components/audio-player.gts" data-diff="+11,-26,+27" }
155155
import Component from '@glimmer/component';
156156
import { tracked } from '@glimmer/tracking';
157-
import playWhen from '../modifiers/play-when.ts';
157+
import playWhen from 'my-app/modifiers/play-when';
158158
import { on } from '@ember/modifier';
159159
160160
interface AudioPlayerSignature {
@@ -191,7 +191,7 @@ We can also let the user provide a fallback for the case where the audio element
191191
```gts { data-filename="app/components/audio-player.gts" data-diff="+11,+12,+13,-29,+30,+31,+32" }
192192
import Component from '@glimmer/component';
193193
import { tracked } from '@glimmer/tracking';
194-
import playWhen from '../modifiers/play-when.ts';
194+
import playWhen from 'my-app/modifiers/play-when';
195195
import { on } from '@ember/modifier';
196196
197197
interface AudioPlayerSignature {
@@ -237,7 +237,7 @@ To represent this, we will update the `default` block to be named `fallback` ins
237237
```gts {data-filename="app/components/audio-player.gts" data-diff="-12,+13,+14,-31,-32,-33,+34,+35,+36,+37,+38,+39,+40,+41" }
238238
import Component from '@glimmer/component';
239239
import { tracked } from '@glimmer/tracking';
240-
import playWhen from '../modifiers/play-when.ts';
240+
import playWhen from 'my-app/modifiers/play-when';
241241
import { on } from '@ember/modifier';
242242
243243
interface AudioPlayerSignature {
@@ -290,7 +290,7 @@ When working in JavaScript, we can provide the exact same information using JSDo
290290
```gjs {data-filename="app/components/audio-player.gjs"}
291291
import Component from '@glimmer/component';
292292
import { tracked } from '@glimmer/tracking';
293-
import playWhen from '../modifiers/play-when.ts';
293+
import playWhen from 'my-app/modifiers/play-when';
294294
import { on } from '@ember/modifier';
295295
296296
/**
@@ -478,7 +478,7 @@ Our helper will accept the same arguments, so we will use it like this:
478478
```typescript {data-filename="app/helpers/format.ts"}
479479
import Helper from '@ember/component/helper';
480480
import { service } from '@ember/service';
481-
import type LocaleService from '../services/locale';
481+
import type LocaleService from ' my-app/services/locale';
482482

483483
interface FormatSignature {
484484
Args: {
@@ -629,7 +629,7 @@ Given an `IntersectionObserverManager` service with an `observe` method, we migh
629629
```typescript {data-filename="app/modifiers/did-intersect.ts"}
630630
import Modifier from 'ember-modifier';
631631
import { service } from '@ember/service';
632-
import type IntersectionObserverManager from '../services/intersection-observer-manager';
632+
import type IntersectionObserverManager from 'my-app/services/intersection-observer-manager';
633633

634634
interface DidIntersectSignature {
635635
Args: {

0 commit comments

Comments
 (0)