Skip to content

Commit

Permalink
Fix test builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Cow-Van committed Feb 21, 2024
1 parent cf118ef commit c156f68
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 38 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@types/chai": "^4.3.11",
"@types/express": "^4.17.21",
"@types/mocha": "^10.0.6",
"@types/node": "^20.10.6",
"@types/node": "^20.11.19",
"@types/supertest": "^6.0.2",
"chai": "^4.3.10",
"mocha": "^10.2.0",
Expand Down
2 changes: 0 additions & 2 deletions src/database/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ if (process.env.NODE_ENV === "testing") {
}).promise();
}

console.log(tableSuffix)

export default db;
export {
tableSuffix,
Expand Down
1 change: 0 additions & 1 deletion src/integration-tests/info-routes.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import dotenv from "dotenv";
dotenv.config();

import { describe, it, before, beforeEach, after } from "mocha";
import request from "supertest";

import app from "../app";
Expand Down
1 change: 0 additions & 1 deletion src/integration-tests/users-routes.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import dotenv from "dotenv";
dotenv.config();

import { describe, it, before, beforeEach, after } from "mocha";
import request from "supertest";

import app from "../app";
Expand Down
8 changes: 7 additions & 1 deletion src/spreadsheet/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import { readCell, readCellRange } from "./read";
import { writeCell, writeCellRange } from "./write";

export {

readCell,
readCellRange,
writeCell,
writeCellRange,
}
1 change: 0 additions & 1 deletion src/tests/database/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import dotenv from "dotenv";
dotenv.config();

import { describe, it } from "mocha";
import { expect } from "chai"; // DOES NOT WORK WITH chai v5+ YET BECAUSE USING COMMONJS (https://github.com/chaijs/chai/issues/1561)

import db from "../../database";
Expand Down
3 changes: 3 additions & 0 deletions src/tests/spreadsheet/cell.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
describe("", () => {

});
4 changes: 3 additions & 1 deletion test.tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"extends": "./basic.tsconfig.json",
"exclude": [],
"compilerOptions": {
"outDir": "./test/"
"outDir": "./test/",
"types": ["mocha", "node"]
}
}
50 changes: 24 additions & 26 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
{
"include": [
"src/**/*"
],
"compilerOptions": {
"target": "es2016",
"module": "commonjs",
"rootDir": "./src/",
"typeRoots": [
"src/types/"
],
"removeComments": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"strictBindCallApply": true,
"strictPropertyInitialization": true,
"noImplicitThis": true,
"useUnknownInCatchVariables": true,
"alwaysStrict": true,
"noImplicitReturns": true,
"noImplicitOverride": true,
"skipLibCheck": true
}
"include": ["src/**/*"],
"exclude": ["src/tests/**/*", "src/integration-tests/**/*"],
"compilerOptions": {
"target": "es2016",
"module": "commonjs",
"rootDir": "./src/",
"types": ["node"],
"typeRoots": ["src/types/", "node_modules/@types"],
"removeComments": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"strictBindCallApply": true,
"strictPropertyInitialization": true,
"noImplicitThis": true,
"useUnknownInCatchVariables": true,
"alwaysStrict": true,
"noImplicitReturns": true,
"noImplicitOverride": true,
"skipLibCheck": true
}
}

0 comments on commit c156f68

Please sign in to comment.