Skip to content

Chore/deps 20230625 2 #3622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion @commitlint/config-validator/src/validate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const invalidSchemas: Record<string, any> = {

describe('validation should pass for', () => {
test.each(Object.entries(validSchemas))('%s', (file, config) => {
expect(() => validateConfig(`${file}.js`, config)).not.toThrowError();
expect(() => validateConfig(`${file}.js`, config)).not.toThrow();
});
});

Expand Down
6 changes: 4 additions & 2 deletions @commitlint/cz-commitlint/src/Process.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,10 @@ describe('conventional-changlog', () => {
};
return process(rules as any, prompts, InquirerFactory(answers) as any).then(
() => {
expect(mockShowValidation).toBeCalledWith('subject can not be empty');
expect(mockShowTitle).toBeCalledTimes(3);
expect(mockShowValidation).toHaveBeenCalledWith(
'subject can not be empty'
);
expect(mockShowTitle).toHaveBeenCalledTimes(3);
}
);
});
Expand Down
2 changes: 1 addition & 1 deletion @commitlint/ensure/src/case.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,5 +334,5 @@ test('true for numeric on lowercase', () => {

test('throw TypeError for invalid case name', () => {
const actualFn = () => ensure('anything', 'someweirdcase' as any);
expect(actualFn).toThrowError(TypeError);
expect(actualFn).toThrow(TypeError);
});
4 changes: 2 additions & 2 deletions @commitlint/parse/src/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import parse from '.';

test('throws when called without params', async () => {
await expect((parse as any)()).rejects.toThrowError('Expected a raw commit');
await expect((parse as any)()).rejects.toThrow('Expected a raw commit');
});

test('throws when called with empty message', async () => {
await expect(parse('')).rejects.toThrowError('Expected a raw commit');
await expect(parse('')).rejects.toThrow('Expected a raw commit');
});

test('returns object with raw message', async () => {
Expand Down
2 changes: 1 addition & 1 deletion @commitlint/resolve-extends/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ test('falls back to global install', async () => {
const ctx = {resolveGlobal, require} as ResolveExtendsContext;

resolveExtends({extends: ['@commitlint/foo-bar']}, ctx);
expect(ctx.resolveGlobal).toBeCalledWith('@commitlint/foo-bar');
expect(ctx.resolveGlobal).toHaveBeenCalledWith('@commitlint/foo-bar');
});

test('fails for missing extends', async () => {
Expand Down
3 changes: 1 addition & 2 deletions @commitlint/rules/src/subject-full-stop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ export const subjectFullStop: SyncRule<string> = (
when = 'always',
value = '.'
) => {

let colonIndex = parsed.header.indexOf(':');
const colonIndex = parsed.header.indexOf(':');
if (colonIndex > 0 && colonIndex === parsed.header.length - 1) {
return [true];
}
Expand Down
265 changes: 108 additions & 157 deletions yarn.lock

Large diffs are not rendered by default.