Skip to content

Commit

Permalink
update unit test snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
romainmenke committed Jan 25, 2025
1 parent 6002ba2 commit 44ab34a
Show file tree
Hide file tree
Showing 18 changed files with 461 additions and 461 deletions.
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
18 changes: 9 additions & 9 deletions src/extension/__tests__/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,12 @@ describe('Extension entry point', () => {

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}",
]
`);
Expand All @@ -142,7 +142,7 @@ describe('Extension entry point', () => {
expect(mockCommands.registerCommand).toHaveBeenCalled();
// cspell:disable
expect(mockCommands.registerCommand.mock.calls[0]).toMatchInlineSnapshot(`
Array [
[
"stylelint.executeAutofix",
[Function],
]
Expand Down Expand Up @@ -186,7 +186,7 @@ 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.",
]
`);
Expand All @@ -203,7 +203,7 @@ describe('Extension entry point', () => {

expect(mockCommands.registerCommand).toHaveBeenCalled();
expect(mockCommands.registerCommand.mock.calls[1]).toMatchInlineSnapshot(`
Array [
[
"stylelint.restart",
[Function],
]
Expand Down Expand Up @@ -336,12 +336,12 @@ describe('Extension entry point', () => {

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!",
]
`);
Expand All @@ -366,12 +366,12 @@ describe('Extension entry point', () => {

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!",
]
`);
Expand Down
Loading

0 comments on commit 44ab34a

Please sign in to comment.