mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-26 17:38:28 +03:00
Merge pull request #292 from DetachHead/tsc_test
run `tsc` in the `test` script
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
"description": "Server that holds the SponsorBlock database",
|
"description": "Server that holds the SponsorBlock database",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "ts-node test/test.ts",
|
"test": "npm run tsc && ts-node test/test.ts",
|
||||||
"dev": "nodemon",
|
"dev": "nodemon",
|
||||||
"dev:bash": "nodemon -x 'npm test ; npm start'",
|
"dev:bash": "nodemon -x 'npm test ; npm start'",
|
||||||
"start": "ts-node src/index.ts",
|
"start": "ts-node src/index.ts",
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import {SBSConfig} from "./types/config.model";
|
import {SBSConfig} from "./types/config.model";
|
||||||
|
import packageJson from "../package.json"
|
||||||
|
|
||||||
const isTestMode = process.env.npm_lifecycle_script === 'ts-node test/test.ts';
|
const isTestMode = process.env.npm_lifecycle_script === packageJson.scripts.test;
|
||||||
const configFile = process.env.TEST_POSTGRES ? 'ci.json'
|
const configFile = process.env.TEST_POSTGRES ? 'ci.json'
|
||||||
: isTestMode ? 'test.json'
|
: isTestMode ? 'test.json'
|
||||||
: 'config.json';
|
: 'config.json';
|
||||||
|
|||||||
@@ -74,8 +74,10 @@
|
|||||||
/* Advanced Options */
|
/* Advanced Options */
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
/* Skip type checking of declaration files. */
|
/* Skip type checking of declaration files. */
|
||||||
"forceConsistentCasingInFileNames": true
|
"forceConsistentCasingInFileNames": true,
|
||||||
/* Disallow inconsistently-cased references to the same file. */
|
/* Disallow inconsistently-cased references to the same file. */
|
||||||
|
|
||||||
|
"resolveJsonModule": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"./src/**/*"
|
"./src/**/*"
|
||||||
|
|||||||
Reference in New Issue
Block a user