Skip to content
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

chore(deps-dev): bump the jest group with 3 updates #582

Merged
merged 4 commits into from
Aug 29, 2024
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
6,074 changes: 3,008 additions & 3,066 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
"devDependencies": {
"@stylelint/postcss-css-in-js": "^0.38.0",
"@stylelint/prettier-config": "^3.0.0",
"@types/jest": "^27.0.3",
"@types/jest": "^29.5.12",
"@types/path-is-inside": "^1.0.3",
"@types/semver": "^7.5.8",
"@types/vscode": "1.82.0",
Expand All @@ -233,7 +233,7 @@
"eslint-config-stylelint": "^22.0.0",
"eslint-plugin-jest": "^28.8.0",
"fast-glob": "^3.2.7",
"jest": "^27.4.3",
"jest": "^29.7.0",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.41",
"postcss-sass": "^0.5.0",
Expand All @@ -243,7 +243,7 @@
"stylelint-processor-glamorous": "^0.3.0",
"stylelint-processor-styled-components": "^1.10.0",
"stylelint-scss": "^5.3.2",
"ts-jest": "^27.0.7",
"ts-jest": "^29.2.5",
"ts-node": "^10.9.2",
"typed-emitter": "^2.1.0",
"typescript": "^4.9.5"
Expand Down
32 changes: 16 additions & 16 deletions src/extension/__tests__/__snapshots__/extension.ts.snap
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Extension entry point should create a language client 1`] = `
Array [
[
"Stylelint",
Object {
"debug": Object {
{
"debug": {
"module": "mock-path",
"options": Object {
"execArgv": Array [
"options": {
"execArgv": [
"--nolazy",
"--inspect=6004",
],
},
},
"run": Object {
"run": {
"module": "mock-path",
},
},
Object {
{
"diagnosticCollectionName": "Stylelint",
"documentSelector": Array [
Object {
"documentSelector": [
{
"scheme": "file",
},
Object {
{
"scheme": "untitled",
},
],
"synchronize": Object {
"fileEvents": Array [
"synchronize": {
"fileEvents": [
undefined,
undefined,
],
Expand All @@ -38,11 +38,11 @@ Array [
`;

exports[`Extension entry point with an active text editor, should send auto-fix commands to the language server 1`] = `
Array [
[
"executeCommand",
Object {
"arguments": Array [
Object {
{
"arguments": [
{
"uri": "file:///path/to/file.ts",
"version": 1,
},
Expand Down
68 changes: 21 additions & 47 deletions src/extension/__tests__/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,12 @@ describe('Extension entry point', () => {
await activate(mockExtensionContext);

expect(mockWorkspace.createFileSystemWatcher).toHaveBeenCalledTimes(2);
expect(mockWorkspace.createFileSystemWatcher.mock.calls[0]).toMatchInlineSnapshot(`
Array [
"**/.stylelintrc{,.js,.json,.yaml,.yml}",
]
`);
expect(mockWorkspace.createFileSystemWatcher.mock.calls[1]).toMatchInlineSnapshot(`
Array [
"**/{stylelint.config.js,.stylelintignore}",
]
`);
expect(mockWorkspace.createFileSystemWatcher.mock.calls[0]).toEqual([
'**/.stylelintrc{,.js,.json,.yaml,.yml}',
]);
expect(mockWorkspace.createFileSystemWatcher.mock.calls[1]).toEqual([
'**/{stylelint.config.js,.stylelintignore}',
]);
});

it('should register an auto-fix command', async () => {
Expand All @@ -138,12 +134,10 @@ describe('Extension entry point', () => {

expect(mockCommands.registerCommand).toHaveBeenCalled();
// cspell:disable
expect(mockCommands.registerCommand.mock.calls[0]).toMatchInlineSnapshot(`
Array [
"stylelint.executeAutofix",
[Function],
]
`);
expect(mockCommands.registerCommand.mock.calls[0]).toMatchObject([
'stylelint.executeAutofix',
expect.any(Function),
]);
// cspell:enable
expect(subscriptions).toContain(disposable);
});
Expand Down Expand Up @@ -182,11 +176,9 @@ describe('Extension entry point', () => {

expect(sendRequest).toHaveBeenCalledTimes(1);
expect(mockWindow.showErrorMessage).toHaveBeenCalledTimes(1);
expect(mockWindow.showErrorMessage.mock.calls[0]).toMatchInlineSnapshot(`
Array [
"Failed to apply Stylelint fixes to the document. Please consider opening an issue with steps to reproduce.",
]
`);
expect(mockWindow.showErrorMessage.mock.calls[0]).toEqual([
'Failed to apply Stylelint fixes to the document. Please consider opening an issue with steps to reproduce.',
]);
});

it('should register a restart server command', async () => {
Expand All @@ -199,12 +191,10 @@ describe('Extension entry point', () => {
const { subscriptions } = mockExtensionContext;

expect(mockCommands.registerCommand).toHaveBeenCalled();
expect(mockCommands.registerCommand.mock.calls[1]).toMatchInlineSnapshot(`
Array [
"stylelint.restart",
[Function],
]
`);
expect(mockCommands.registerCommand.mock.calls[1]).toMatchObject([
'stylelint.restart',
expect.any(Function),
]);
expect(subscriptions).toContain(disposable);
});

Expand Down Expand Up @@ -332,16 +322,8 @@ describe('Extension entry point', () => {
await new Promise((resolve) => setImmediate(resolve));

expect(mockWindow.showErrorMessage).toHaveBeenCalledTimes(2);
expect(mockWindow.showErrorMessage.mock.calls[0]).toMatchInlineSnapshot(`
Array [
"Stylelint: Problem!",
]
`);
expect(mockWindow.showErrorMessage.mock.calls[1]).toMatchInlineSnapshot(`
Array [
"Stylelint: String problem!",
]
`);
expect(mockWindow.showErrorMessage.mock.calls[0]).toEqual(['Stylelint: Problem!']);
expect(mockWindow.showErrorMessage.mock.calls[1]).toEqual(['Stylelint: String problem!']);
});

it('should show an error message if restarting the language server fails', async () => {
Expand All @@ -362,16 +344,8 @@ describe('Extension entry point', () => {
await mockCommands.registerCommand.mock.calls[1][1]();

expect(mockWindow.showErrorMessage).toHaveBeenCalledTimes(2);
expect(mockWindow.showErrorMessage.mock.calls[0]).toMatchInlineSnapshot(`
Array [
"Stylelint: Problem!",
]
`);
expect(mockWindow.showErrorMessage.mock.calls[1]).toMatchInlineSnapshot(`
Array [
"Stylelint: String problem!",
]
`);
expect(mockWindow.showErrorMessage.mock.calls[0]).toEqual(['Stylelint: Problem!']);
expect(mockWindow.showErrorMessage.mock.calls[1]).toEqual(['Stylelint: String problem!']);
});

it('should stop language client on deactivate', async () => {
Expand Down
Loading
Loading