Skip to content

Commit

Permalink
polish
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaMachina committed Dec 14, 2024
1 parent 75b6457 commit 21d467d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
7 changes: 7 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,13 @@ module.exports = {
'**/*.spec.{ts,js.jsx.tsx}',
],
extends: ['plugin:@vitest/legacy-recommended'],
rules: {
'@vitest/expect-expect': [
'error',
{ assertFunctionNames: ['expect*'] },
],
'@vitest/no-disabled-tests': 'error',
},
},
{
// Resources are typically our helper scripts; make life easier there
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ describe('jsonParse', () => {
expect(ast.members[0].value).toStrictEqual(value);
}

// eslint-disable-next-line @vitest/expect-expect
it('correctly parses escaped strings', () => {
expectEscapedString(
'{ "test": "\\"" }',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @vitest/expect-expect */
/**
* Copyright (c) 2021 GraphQL Contributors
* All rights reserved.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ describe('MessageProcessor with no config', () => {
project.lsp.handleShutdownRequest();
});

// TODO: this test fails
// eslint-disable-next-line @vitest/no-disabled-tests -- TODO: this test fails
it.skip('initializes when presented with a valid config later', async () => {
const project = new MockProject({
files: [...defaultFiles],
Expand Down Expand Up @@ -150,7 +150,7 @@ describe('MessageProcessor with config', () => {
fetchMock.mockRestore();
});

// TODO: this test fails
// eslint-disable-next-line @vitest/no-disabled-tests -- TODO: this test fails
it.skip('caches files and schema with .graphql file config, and the schema updates with watched file changes', async () => {
const project = new MockProject({
files: [
Expand Down Expand Up @@ -354,7 +354,7 @@ describe('MessageProcessor with config', () => {
project.lsp.handleShutdownRequest();
});

// TODO: this test fails
// eslint-disable-next-line @vitest/no-disabled-tests -- TODO: this test fails
it.skip('caches files and schema with a URL config', async () => {
const offset = parseInt(version, 10) > 16 ? 25 : 0;

Expand Down Expand Up @@ -489,7 +489,7 @@ describe('MessageProcessor with config', () => {
project.lsp.handleShutdownRequest();
});

// TODO: this test fails
// eslint-disable-next-line @vitest/no-disabled-tests -- TODO: this test fails
it.skip('caches multiple projects with files and schema with a URL config and a local schema', async () => {
mockSchema(require('../../../graphiql/test/schema'));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ describe('startServer', () => {
} catch {}
}
});
// TODO: Blocked by https://github.com/vitest-dev/vitest/issues/7082
// eslint-disable-next-line @vitest/no-disabled-tests -- TODO: Blocked by https://github.com/vitest-dev/vitest/issues/7082
it.skip('should start the server', async () => {
c = await startServer();
// if the server starts, we're good
expect(true).toBe(true);
});
// TODO: this one fails to exit properly in tests
// eslint-disable-next-line @vitest/no-disabled-tests -- TODO: this one fails to exit properly in tests
it.skip('should start the server with stream', async () => {
c = await startServer({
method: 'stream',
});
// if the server starts, we're good
expect(true).toBe(true);
});
// TODO: Blocked by https://github.com/vitest-dev/vitest/issues/7082
// eslint-disable-next-line @vitest/no-disabled-tests -- TODO: Blocked by https://github.com/vitest-dev/vitest/issues/7082
it.skip('should start the server with ipc', async () => {
c = await startServer({
method: 'node',
Expand Down

0 comments on commit 21d467d

Please sign in to comment.