Skip to content

Commit 34ba6cc

Browse files
committed
wip
1 parent 17ae3b1 commit 34ba6cc

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

eslint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default tseslint.config(
3838
},
3939
{
4040
sourceTag: 'scope:plugin',
41-
onlyDependOnLibsWithTags: ['scope:shared'],
41+
onlyDependOnLibsWithTags: ['scope:shared', 'scope:plugin'],
4242
},
4343
{
4444
sourceTag: 'scope:tooling',

packages/plugin-typescript/src/lib/normalize-compiler-options.unit.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { CompilerOptions } from 'typescript';
22
import { describe, expect, it } from 'vitest';
3+
import { osAgnosticPath } from '@code-pushup/test-utils';
34
import config554 from '../../mocks/fixtures/default-ts-configs/5.5.4.js';
45
import {
56
handleCompilerOptionStrict,
@@ -79,7 +80,7 @@ describe('normalizeCompilerOptions', () => {
7980

8081
it('should return default compiler options from provided file', async () => {
8182
await expect(
82-
normalizeCompilerOptions({ tsConfigPath: 'mocked/away/tsconfig.json' }),
83+
normalizeCompilerOptions({ tsConfigPath: 'mocked-away/tsconfig.json' }),
8384
).resolves.toStrictEqual(
8485
expect.objectContaining({
8586
verbatimModuleSyntax: false,
@@ -90,7 +91,7 @@ describe('normalizeCompilerOptions', () => {
9091
expect(loadTsConfigDefaultsByVersionSpy).toHaveBeenCalledTimes(1);
9192
expect(loadTargetConfigSpy).toHaveBeenCalledTimes(1);
9293
expect(loadTargetConfigSpy).toHaveBeenCalledWith(
93-
expect.stringContaining('mocked/away/tsconfig.json'),
94+
expect.stringContaining(osAgnosticPath('mocked-away')),
9495
);
9596
});
9697
});

packages/plugin-typescript/src/lib/typescript-plugin.unit.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ describe('typescriptPlugin-config-object', () => {
3737

3838
it('should create valid plugin config', async () => {
3939
const pluginConfig = await typescriptPlugin({
40-
tsConfigPath: 'mocked/away/tsconfig.json',
40+
tsConfigPath: 'mocked-away/tsconfig.json',
4141
});
4242

4343
expect(loadTsConfigDefaultsByVersionSpy).toHaveBeenCalledTimes(1);
4444
expect(loadTargetConfigSpy).toHaveBeenCalledTimes(1);
4545
expect(loadTargetConfigSpy).toHaveBeenCalledWith(
46-
expect.stringContaining('mocked/away/tsconfig.json'),
46+
expect.stringContaining('mocked-away/tsconfig.json'),
4747
);
4848
expect(() => pluginConfigSchema.parse(pluginConfig)).not.toThrow();
4949

0 commit comments

Comments
 (0)