Skip to content

Commit 49dbded

Browse files
committed
Reorganize tests, remove them from the build package
1 parent d8c546d commit 49dbded

14 files changed

+17
-14
lines changed

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jsdom-testing-mocks",
3-
"version": "1.5.0-beta.8",
3+
"version": "1.5.0",
44
"author": "Ivan Galiatin",
55
"license": "MIT",
66
"description": "A set of tools for emulating browser behavior in jsdom environment",
@@ -24,8 +24,11 @@
2424
"main": "dist/index.js",
2525
"typings": "dist/index.d.ts",
2626
"files": [
27-
"dist",
28-
"src"
27+
"/dist",
28+
"/src",
29+
"!/src/**/__tests__/*",
30+
"!/src/**/*.test.tsx",
31+
"!/src/mocks/web-animations-api/testTools.ts"
2932
],
3033
"engines": {
3134
"node": ">=14"

src/mocks/web-animations-api/AnimationEffect.test.ts renamed to src/mocks/web-animations-api/__tests__/AnimationEffect.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { mockAnimationEffect } from './AnimationEffect';
1+
import { mockAnimationEffect } from '../AnimationEffect';
22

33
mockAnimationEffect();
44

src/mocks/web-animations-api/AnimationTimeline.test.ts renamed to src/mocks/web-animations-api/__tests__/AnimationTimeline.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { mockAnimationTimeline } from './AnimationTimeline';
1+
import { mockAnimationTimeline } from '../AnimationTimeline';
22

33
mockAnimationTimeline();
44

src/mocks/web-animations-api/DocumentTimeline.test.ts renamed to src/mocks/web-animations-api/__tests__/DocumentTimeline.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { mockDocumentTimeline } from './DocumentTimeline';
1+
import { mockDocumentTimeline } from '../DocumentTimeline';
22

33
mockDocumentTimeline();
44
jest.useFakeTimers();

src/mocks/web-animations-api/KeyframeEffect.test.ts renamed to src/mocks/web-animations-api/__tests__/KeyframeEffect.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
MockedKeyframeEffect,
33
convertPropertyIndexedKeyframes,
44
mockKeyframeEffect,
5-
} from './KeyframeEffect';
5+
} from '../KeyframeEffect';
66

77
mockKeyframeEffect();
88

src/mocks/web-animations-api/tests/cancel.test.ts renamed to src/mocks/web-animations-api/__tests__/cancel.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { playAnimation, FRAME_DURATION, framesToTime } from './tools';
1+
import { playAnimation, FRAME_DURATION, framesToTime } from '../testTools';
22
import { mockAnimationsApi } from '../index';
33

44
mockAnimationsApi();

src/mocks/web-animations-api/tests/commitStyles.test.ts renamed to src/mocks/web-animations-api/__tests__/commitStyles.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
playAnimation,
44
playAnimationInReverse,
55
FRAME_DURATION,
6-
} from './tools';
6+
} from '../testTools';
77
import { mockAnimationsApi } from '../index';
88

99
mockAnimationsApi();

src/mocks/web-animations-api/tests/effect.test.ts renamed to src/mocks/web-animations-api/__tests__/effect.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { playAnimation, FRAME_DURATION } from './tools';
1+
import { playAnimation, FRAME_DURATION } from '../testTools';
22
import { mockAnimationsApi } from '../index';
33

44
mockAnimationsApi();

src/mocks/web-animations-api/tests/events.test.ts renamed to src/mocks/web-animations-api/__tests__/events.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { playAnimation, FRAME_DURATION } from './tools';
1+
import { playAnimation, FRAME_DURATION } from '../testTools';
22
import { mockAnimationsApi } from '../index';
33

44
mockAnimationsApi();

src/mocks/web-animations-api/index.test.ts renamed to src/mocks/web-animations-api/__tests__/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { mockAnimationsApi } from './index';
1+
import { mockAnimationsApi } from '../index';
22

33
mockAnimationsApi();
44

0 commit comments

Comments
 (0)