Skip to content

Commit 9a424f9

Browse files
committed
chore: fix test
1 parent 4eed60d commit 9a424f9

File tree

5 files changed

+13
-16
lines changed

5 files changed

+13
-16
lines changed

test/jest.config.unit.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ module.exports = {
99
transform: {
1010
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest',
1111
},
12+
testURL: 'http://localhost',
1213
collectCoverageFrom: ['src/*.{ts}'],
1314
testRegex: 'test/unit/.*\\.spec\\.ts',
1415
coveragePathIgnorePatterns: ['node_modules', 'fixtures'],

test/unit/authcache.spec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
// @flow
1+
import { AuthCache, UserData } from '../../src/authcache';
22

3-
import { AuthCache, UserData } from '../../src/authcache.js';
4-
5-
import logger from './partials/logger.js';
3+
import logger from './partials/logger';
64
import config from './partials/config';
75

86
describe('AuthCache Unit Tests', () => {

test/unit/gitlab.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Callback, RemoteUser } from '@verdaccio/types';
22
import Gitlab from 'gitlab'; // eslint-disable-line no-unused-vars
33

44
import { VerdaccioGitlabPackageAccess } from '../../src/gitlab';
5-
import VerdaccioGitlab from '../../src/gitlab.js';
5+
import VerdaccioGitlab from '../../src/gitlab';
66

77
import config from './partials/config';
88

test/unit/partials/config/index.js renamed to test/unit/partials/config/index.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
//@flow
21

3-
import type { PluginOptions, RemoteUser } from '@verdaccio/types';
4-
import type { VerdaccioGitlabConfig } from '../../../../src/gitlab.js';
5-
import type { UserDataGroups } from '../../../../src/authcache.js';
2+
import { PluginOptions, RemoteUser } from '@verdaccio/types';
3+
import { VerdaccioGitlabConfig } from '../../../../src/gitlab';
4+
import { UserDataGroups } from '../../../../src/authcache';
65

7-
import logger from '../logger.js';
8-
import { UserData } from '../../../../src/authcache.js';
6+
import logger from '../logger';
7+
import { UserData } from '../../../../src/authcache';
98

109

1110
const verdaccioGitlabConfig: VerdaccioGitlabConfig = {
1211
url: 'myUrl'
1312
};
1413

15-
const options: PluginOptions = {
16-
// $FlowFixMe
14+
const options: PluginOptions<VerdaccioGitlabConfig> = {
15+
//@ts-ignore
1716
config: {},
17+
//@ts-ignore
1818
logger: logger
1919
};
2020

test/unit/partials/logger.js renamed to test/unit/partials/logger.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
//@flow
2-
3-
import type { Logger } from '@verdaccio/types';
1+
import { Logger } from '@verdaccio/types';
42

53
const logger: Logger = {
64
error: jest.fn(),

0 commit comments

Comments
 (0)