Skip to content

Commit ed4a6e9

Browse files
committed
Move type tests for deprecated (get|set)Owner
These really belong in the `@ember/application` re-export, not in the tests for `@ember/owner` itself, which should have no knowledge of the existence of `@ember/application` (but vice versa is fine).
1 parent 3ca9834 commit ed4a6e9

File tree

3 files changed

+4
-14
lines changed

3 files changed

+4
-14
lines changed

type-tests/preview/@ember/application-test/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ import Owner from '@ember/owner';
44
import ApplicationInstance from '@ember/application/instance';
55
import Service from '@ember/service';
66
import { expectTypeOf } from 'expect-type';
7+
import { getOwner as getOwnerProper, setOwner as setOwnerProper } from '@ember/owner';
8+
9+
expectTypeOf(getOwner).toEqualTypeOf(getOwnerProper);
10+
expectTypeOf(setOwner).toEqualTypeOf(setOwnerProper);
711

812
expectTypeOf(getOwner({})).toEqualTypeOf<Owner | undefined>();
913

type-tests/preview/@ember/owner-tests.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,6 @@ import Owner, {
1010
} from '@ember/owner';
1111
import Component from '@glimmer/component';
1212
import { expectTypeOf } from 'expect-type';
13-
import {
14-
getOwner as getOwnerApplication,
15-
setOwner as setOwnerApplication,
16-
} from '@ember/application';
17-
18-
expectTypeOf(getOwnerApplication).toEqualTypeOf(getOwner);
19-
expectTypeOf(setOwnerApplication).toEqualTypeOf(setOwner);
2013

2114
// Just a class we can construct in the Factory and FactoryManager tests
2215
declare class ConstructThis {

type-tests/stable/@ember/owner-tests.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,6 @@ import Owner, {
1010
} from '@ember/owner';
1111
import Component from '@glimmer/component';
1212
import { expectTypeOf } from 'expect-type';
13-
import {
14-
getOwner as getOwnerApplication,
15-
setOwner as setOwnerApplication,
16-
} from '@ember/application';
17-
18-
expectTypeOf(getOwnerApplication).toEqualTypeOf(getOwner);
19-
expectTypeOf(setOwnerApplication).toEqualTypeOf(setOwner);
2013

2114
// Just a class we can construct in the Factory and FactoryManager tests
2215
declare class ConstructThis {

0 commit comments

Comments
 (0)