Skip to content

Commit 85aa3e3

Browse files
committed
chore: move tests into src dir
1 parent 0a65d86 commit 85aa3e3

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
"build": "parcel build",
3232
"test": "jest --testMatch '/**/*.spec.ts'",
3333
"test:watch": "npm run test -- --watch",
34-
"lint": "biome lint ./{src,tests}",
34+
"lint": "biome lint ./src",
3535
"lint:fix": "npm run lint -- --write",
36-
"format": "biome format ./{src,tests}",
36+
"format": "biome format ./src",
3737
"format:write": "npm run format -- --write",
3838
"prepare": "husky"
3939
},

tests/contribution.integration.spec.ts renamed to src/tests/contribution.integration.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { fetchStats } from '../src/contribution';
1+
import { fetchStats } from '../contribution';
22
import { fetchStatsShape } from './utils';
33

44
describe('contribution', () => {

tests/contribution.spec.ts renamed to src/tests/contribution.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { fetchStats } from '../src/contribution';
2-
import type { GitHubStats } from '../src/transformers';
3-
import { parseContributions, parseGitHubStats } from '../src/transformers';
1+
import { fetchStats } from '../contribution';
2+
import type { GitHubStats } from '../transformers';
3+
import { parseContributions, parseGitHubStats } from '../transformers';
44

5-
jest.mock('../src/transformers', () => ({
5+
jest.mock('../transformers', () => ({
66
parseContributions: jest.fn(),
77
parseGitHubStats: jest.fn(),
88
}));
File renamed without changes.

tests/transformers.spec.ts renamed to src/tests/transformers.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { parseContributions, parseGitHubStats } from '../src/transformers';
1+
import { parseContributions, parseGitHubStats } from '../transformers';
22
import { mockGitHubResponse } from './utils';
33

44
describe('transformers', () => {

tests/utils.ts renamed to src/tests/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ export const fetchStatsShape = {
1515
};
1616

1717
export const mockGitHubResponse = fs.readFileSync(
18-
'./tests/mocks/mock-github-response.html',
18+
'./src/tests/mocks/mock-github-response.html',
1919
'utf8',
2020
);

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
"moduleResolution": "Node"
99
},
1010
"include": ["src"],
11-
"exclude": ["tests"]
11+
"exclude": ["src/tests"]
1212
}

0 commit comments

Comments
 (0)