Skip to content

Commit db6ab44

Browse files
committed
test(wtr): update tests to use relative path to utils
instead of weird fake module
1 parent 1b39648 commit db6ab44

File tree

95 files changed

+157
-133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+157
-133
lines changed

packages/@lwc/integration-not-karma/test/accessibility/non-standard-aria-props/index.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { createElement } from 'lwc';
2+
import Light from 'x/light';
3+
import Shadow from 'x/shadow';
24
import {
35
attachReportingControlDispatcher,
46
detachReportingControlDispatcher,
57
nonStandardAriaProperties,
6-
} from 'test-utils';
7-
import Light from 'x/light';
8-
import Shadow from 'x/shadow';
8+
} from '../../../helpers/utils.js';
99

1010
// This test only works if the ARIA reflection polyfill is loaded
1111
describe.runIf(process.env.ENABLE_ARIA_REFLECTION_GLOBAL_POLYFILL)(

packages/@lwc/integration-not-karma/test/accessibility/synthetic-cross-root-aria/index.spec.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
import { createElement } from 'lwc';
2-
import { attachReportingControlDispatcher, detachReportingControlDispatcher } from 'test-utils';
32

43
import AriaContainer from 'x/ariaContainer';
54
import Valid from 'x/valid';
5+
import {
6+
attachReportingControlDispatcher,
7+
detachReportingControlDispatcher,
8+
} from '../../../helpers/utils.js';
69

710
const expectedMessageForCrossRoot =
811
'Error: [LWC warn]: Element <input> uses attribute "aria-labelledby" to reference element <label>, which is not in the same shadow root. This will break in native shadow DOM. For details, see: https://sfdc.co/synthetic-aria\n<x-aria-source>';

packages/@lwc/integration-not-karma/test/act/index.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import UiAnother from 'ui/another';
1515
import UiOutputPercent from 'ui/outputpercent';
1616
import ForceFoo from 'force/foo';
1717
import NestedHtmlTags from 'nested/htmlTags';
18-
import { extractDataIds } from 'test-utils';
18+
import { extractDataIds } from '../../helpers/utils.js';
1919
import testProps from './act-components/test-props';
2020
import testAttrs from './act-components/test-attrs';
2121
import testBodySlot from './act-components/test-body-slot';

packages/@lwc/integration-not-karma/test/api/CustomElementConstructor-getter/index.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { spyConsole } from 'test-utils';
21
import { LightningElement } from 'lwc';
32

43
import ReflectElement from 'x/reflect';
@@ -10,6 +9,7 @@ import AttrChanged from 'x/attrChanged';
109
import ReflectCamel from 'x/reflectCamel';
1110
import WithChildElmsHasSlot from 'x/withChildElmsHasSlot';
1211
import WithChildElmsHasSlotLight from 'x/withChildElmsHasSlotLight';
12+
import { spyConsole } from '../../../helpers/utils.js';
1313
import { USE_COMMENTS_FOR_FRAGMENT_BOOKENDS } from '../../../helpers/utils.js';
1414

1515
const vFragBookend = USE_COMMENTS_FOR_FRAGMENT_BOOKENDS ? '<!---->' : '';

packages/@lwc/integration-not-karma/test/api/createElement/index.spec.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
import { createElement, LightningElement, setFeatureFlagForTest } from 'lwc';
2-
import { isNativeShadowRootInstance, isSyntheticShadowRootInstance } from 'test-utils';
32

43
import Test from 'x/test';
54
import ShadowRootGetter from 'x/shadowRootGetter';
5+
import {
6+
isNativeShadowRootInstance,
7+
isSyntheticShadowRootInstance,
8+
} from '../../../helpers/utils.js';
69

710
function testInvalidOptions(type, option) {
811
it(`throws a TypeError if option is a ${type}`, () => {

packages/@lwc/integration-not-karma/test/api/freezeTemplate/index.spec.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import { registerTemplate, freezeTemplate, setFeatureFlagForTest } from 'lwc';
22

3-
import { attachReportingControlDispatcher, detachReportingControlDispatcher } from 'test-utils';
3+
import {
4+
attachReportingControlDispatcher,
5+
detachReportingControlDispatcher,
6+
} from '../../../helpers/utils.js';
47

58
describe('freezeTemplate', () => {
69
let dispatcher;

packages/@lwc/integration-not-karma/test/api/getComponentDef/index.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { LightningElement, api, getComponentDef, createElement } from 'lwc';
2-
import { ariaProperties } from 'test-utils';
32

43
import PublicProperties from 'x/publicProperties';
54
import PublicAccessors from 'x/publicAccessors';
@@ -8,6 +7,7 @@ import PublicPropertiesInheritance from 'x/publicPropertiesInheritance';
87
import PublicMethodsInheritance from 'x/publicMethodsInheritance';
98
import PrivateAccessors from 'x/privateAccessors';
109
import HtmlElementProps from 'x/htmlElementProps';
10+
import { ariaProperties } from '../../../helpers/utils.js';
1111

1212
function testInvalidComponentConstructor(name, ctor) {
1313
it(`should throw for ${name}`, () => {

packages/@lwc/integration-not-karma/test/api/sanitizeHtmlContent/index.spec.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { createElement } from 'lwc';
2-
import { getHooks, setHooks } from 'test-utils';
3-
42
import XInnerHtml from 'x/innerHtml';
3+
import { getHooks, setHooks } from '../../../helpers/utils.js';
54

65
const ACTUAL_CONTENT = 'Hello <b>World</b>';
76
const ALTERNATIVE_CONTENT = 'Hello <b>LWC</b>';

packages/@lwc/integration-not-karma/test/component/LightningElement.addEventListener/index.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { createElement } from 'lwc';
2-
import { spyConsole } from 'test-utils';
32

43
import EventHandler from 'x/eventHandler';
54
import EventHandlerOptions from 'x/eventHandlerOptions';
65
import AdditionWhileDispatch from 'x/additionWhileDispatch';
6+
import { spyConsole } from '../../../helpers/utils.js';
77

88
it('should be able to attach an event listener on the host element', () => {
99
let thisValue;

packages/@lwc/integration-not-karma/test/component/LightningElement.attachInternals/api/index.spec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { createElement } from 'lwc';
2-
import {
3-
customElementCallbackReactionErrorListener,
4-
ENABLE_ELEMENT_INTERNALS_AND_FACE,
5-
IS_SYNTHETIC_SHADOW_LOADED,
6-
} from 'test-utils';
72

83
import ShadowDomCmp from 'ai/shadowDom';
94
import LightDomCmp from 'ai/lightDom';
105
import BasicCmp from 'ai/basic';
6+
import {
7+
customElementCallbackReactionErrorListener,
8+
ENABLE_ELEMENT_INTERNALS_AND_FACE,
9+
IS_SYNTHETIC_SHADOW_LOADED,
10+
} from '../../../../helpers/utils.js';
1111

1212
const testConnectedCallbackError = (elm, msg) => {
1313
const error = customElementCallbackReactionErrorListener(() => {

0 commit comments

Comments
 (0)