Skip to content

Commit e9dcb25

Browse files
committed
Use export type for public API
Without this I get lots of errors when building a project that uses the current @ember/test-helpers master: ``` WARNING in ./node_modules/@ember/test-helpers/index.js 4:0-262 export 'DeprecationFailure' (reexported as 'DeprecationFailure') was not found in './setup-context' (possible exports: ComponentRenderMap, SetUsage, default, getContext, getDeprecations, getDeprecationsDuringCallback, getWarnings, getWarningsDuringCallback, isTestContext, pauseTest, resumeTest, setContext, unsetContext) @ ./assets/test.js 143:13-65 WARNING in ./node_modules/@ember/test-helpers/index.js 4:0-262 export 'Warning' (reexported as 'Warning') was not found in './setup-context' (possible exports: ComponentRenderMap, SetUsage, default, getContext, getDeprecations, getDeprecationsDuringCallback, getWarnings, getWarningsDuringCallback, isTestContext, pauseTest, resumeTest, setContext, unsetContext) @ ./assets/test.js 143:13-65 WARNING in ./node_modules/@ember/test-helpers/index.js 4:0-262 export 'BaseContext' (reexported as 'BaseContext') was not found in './setup-context' (possible exports: ComponentRenderMap, SetUsage, default, getContext, getDeprecations, getDeprecationsDuringCallback, getWarnings, getWarningsDuringCallback, isTestContext, pauseTest, resumeTest, setContext, unsetContext) @ ./assets/test.js 143:13-65 WARNING in ./node_modules/@ember/test-helpers/index.js 4:0-262 export 'TestContext' (reexported as 'TestContext') was not found in './setup-context' (possible exports: ComponentRenderMap, SetUsage, default, getContext, getDeprecations, getDeprecationsDuringCallback, getWarnings, getWarningsDuringCallback, isTestContext, pauseTest, resumeTest, setContext, unsetContext) @ ./assets/test.js 143:13-65 WARNING in ./node_modules/@ember/test-helpers/index.js 13:0-76 export 'default' (reexported as 'DebugInfo') was not found in './-internal/debug-info' (possible exports: TestDebugInfo, backburnerDebugInfoAvailable, getDebugInfo) @ ./assets/test.js 143:13-65 WARNING in ./node_modules/@ember/test-helpers/index.js 15:0-75 export 'TestMetadata' (reexported as 'TestMetadata') was not found in './test-metadata' (possible exports: __TestMetadata, default) @ ./assets/test.js 143:13-65 ```
1 parent 412a4ba commit e9dcb25

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

  • addon-test-support/@ember/test-helpers

addon-test-support/@ember/test-helpers/index.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ import {
66
export { setResolver, getResolver } from './resolver';
77
export { getApplication, setApplication } from './application';
88
export { default as hasEmberVersion } from './has-ember-version';
9+
export type {
10+
BaseContext,
11+
DeprecationFailure,
12+
TestContext,
13+
Warning,
14+
} from './setup-context';
915
export {
1016
default as setupContext,
1117
getContext,
@@ -15,12 +21,8 @@ export {
1521
resumeTest,
1622
getDeprecations,
1723
getDeprecationsDuringCallback,
18-
DeprecationFailure,
1924
getWarnings,
2025
getWarningsDuringCallback,
21-
Warning,
22-
BaseContext,
23-
TestContext,
2426
} from './setup-context';
2527
export { default as teardownContext } from './teardown-context';
2628
export {
@@ -39,9 +41,11 @@ export { default as settled, isSettled, getSettledState } from './settled';
3941
export { default as waitUntil } from './wait-until';
4042
export { default as validateErrorHandler } from './validate-error-handler';
4143
export { default as setupOnerror, resetOnerror } from './setup-onerror';
42-
export { getDebugInfo, default as DebugInfo } from './-internal/debug-info';
44+
export type { default as DebugInfo } from './-internal/debug-info';
45+
export { getDebugInfo } from './-internal/debug-info';
4346
export { default as registerDebugInfoHelper } from './-internal/debug-info-helpers';
44-
export { default as getTestMetadata, TestMetadata } from './test-metadata';
47+
export type { TestMetadata } from './test-metadata';
48+
export { default as getTestMetadata } from './test-metadata';
4549
export {
4650
registerHook as _registerHook,
4751
runHooks as _runHooks,

0 commit comments

Comments
 (0)