Skip to content

Commit f49b730

Browse files
committed
test folder relocated
1 parent ebd25d0 commit f49b730

File tree

8 files changed

+16
-37
lines changed

8 files changed

+16
-37
lines changed

src/test/helpers/graphquill.config.js renamed to __tests__/helpers/graphquill.config.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
module.exports = {
42
// change "./server/index.js" to the relative path from the root directory to
53
// the file that starts your server

src/test/runTest.ts renamed to __tests__/runTest.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// unused test file
2+
13
/* eslint-disable import/no-extraneous-dependencies */
24
import * as path from 'path';
35

src/test/suite/extension.test.ts renamed to __tests__/suite/extension.test.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// unused test file
2+
13
import * as assert from 'assert';
24

35
// You can import and use all API from the 'vscode' module

src/test/suite/index.ts renamed to __tests__/suite/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// unused test files
2+
13
/* eslint-disable import/no-extraneous-dependencies */
24
import * as path from 'path';
35
import * as Mocha from 'mocha';

src/test/suite/parser.test.ts renamed to __tests__/suite/parser.test.ts

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
// * THIS LINE SETS THE ENVIRONMENT TO MOCHA, so describe, it etc. are not undefined
22
/* eslint-env mocha */
33

4+
/**
5+
* These tests are run using the `npm run parseUnitTest` command
6+
*/
7+
48
// * this rule is disable for testing files because mocha uses the this keyword (I think)
59
// * under the hood, and arrow functions point to the window object
610
/* eslint-disable prefer-arrow-callback */
@@ -11,10 +15,10 @@ import { expect } from 'chai';
1115
import 'mocha';
1216
import 'path';
1317

14-
const parseQuery = require('../../modules/client/parseQuery');
15-
const checkQueryBrackets = require('../../modules/client/checkQueryBrackets');
16-
const extractQueries = require('../../modules/client/extractQueries');
17-
const parseConfigFile = require('../../modules/client/parseConfigFile');
18+
const parseQuery = require('../../src/modules/client/parseQuery');
19+
const checkQueryBrackets = require('../../src/modules/client/checkQueryBrackets');
20+
const extractQueries = require('../../src/modules/client/extractQueries');
21+
const parseConfigFile = require('../../src/modules/client/parseConfigFile');
1822

1923
// const findRootDirectory = require('../../modules/client/findRootDirectory');
2024
// const parseConfigFile = require('../../modules/client/parseConfigFile');

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"watch": "tsc -watch -p ./",
5454
"pretest": "npm run compile",
5555
"test": "npm run parseUnitTest",
56-
"parseUnitTest": "nyc mocha -r ts-node/register src/test/suite/parser.test.ts"
56+
"parseUnitTest": "nyc mocha -r ts-node/register __tests__/suite/parser.test.ts"
5757
},
5858
"devDependencies": {
5959
"@types/chai": "^4.2.4",

src/test/suite/server.test.ts

-29
This file was deleted.

tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
// "noUnusedParameters": true, /* Report errors on unused parameters. */
2020
},
2121
"include": [
22-
"src/"
22+
"src/", "test"
2323
],
2424
"exclude": [
2525
"node_modules",

0 commit comments

Comments
 (0)