mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-11 22:17:14 +03:00
read test script value from package.json
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import fs from 'fs';
|
||||
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'
|
||||
: isTestMode ? 'test.json'
|
||||
: 'config.json';
|
||||
|
||||
Reference in New Issue
Block a user