Skip to content

Commit 15514e0

Browse files
committed
refactor(test/utils): adapt with dependencies upgrade
1 parent 4a7a19b commit 15514e0

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/utils.test.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { Case, Level } from '@commitlint/load';
1+
import type { TargetCaseType } from '@commitlint/types';
2+
import { RuleConfigSeverity } from '@commitlint/types';
23
import { green, red } from 'chalk';
34
import { getLongest, pipeWith, valueFromRule, wordCase, maxLengthTransformerFactory } from './utils';
45

@@ -28,7 +29,7 @@ describe('utils', () => {
2829
});
2930

3031
describe('wordCase', () => {
31-
test.each<[string, Case, string]>([
32+
test.each<[string, TargetCaseType, string]>([
3233
['FOO_BAR', 'lower-case', 'foo_bar'],
3334
['FOO_BAR', 'lowercase', 'foo_bar'],
3435
['FOO_BAR', 'lowerCase', 'foo_bar'],
@@ -55,19 +56,19 @@ describe('utils', () => {
5556
});
5657

5758
test('should return false if disabled', () => {
58-
const result = valueFromRule([Level.Disable, 'always', 72]);
59+
const result = valueFromRule([RuleConfigSeverity.Disabled, 'always', 72]);
5960

6061
expect(result).toBeFalsy();
6162
});
6263

6364
test('should return false if applicable never', () => {
64-
const result = valueFromRule([Level.Error, 'never', 72]);
65+
const result = valueFromRule([RuleConfigSeverity.Error, 'never', 72]);
6566

6667
expect(result).toBeFalsy();
6768
});
6869

6970
test('should return value of rule', () => {
70-
const result = valueFromRule([Level.Error, 'always', 72]);
71+
const result = valueFromRule([RuleConfigSeverity.Error, 'always', 72]);
7172

7273
expect(result).toBe(72);
7374
});

0 commit comments

Comments
 (0)