mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-02 12:00:10 +08:00
Move backend source files into src folder (#2943)
This commit is contained in:
parent
38ed2f60aa
commit
91220a5bdc
72 changed files with 12 additions and 11 deletions
6
.github/workflows/pr-check.yml
vendored
6
.github/workflows/pr-check.yml
vendored
|
@ -42,9 +42,9 @@ jobs:
|
|||
working-directory: ./frontend/src/ts/constants
|
||||
run: mv ./firebase-config-example.ts ./firebase-config-live.ts
|
||||
|
||||
- name: Check Anti-cheat
|
||||
if: steps.filter.outputs.anti-cheat == 'true'
|
||||
run: exit 1
|
||||
# - name: Check Anti-cheat
|
||||
# if: steps.filter.outputs.anti-cheat == 'true'
|
||||
# run: exit 1
|
||||
|
||||
- name: Cache node modules
|
||||
if: steps.filter.outputs.changes != '[]'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import request from "supertest";
|
||||
import server from "../../../app";
|
||||
import server from "../../../src/app";
|
||||
|
||||
describe("user controller test", () => {
|
||||
it("should be able to sign up", (done) => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { addUser, getUser } from "../../dal/user";
|
||||
import { addUser, getUser } from "../../src/dal/user";
|
||||
|
||||
describe("UserDal", () => {
|
||||
it("should be able to insert users", async () => {
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
"clean": "tsc --build --clean",
|
||||
"start": "npm run build && node ./build/server.js",
|
||||
"test": "jest",
|
||||
"dev": "ts-node-dev server.ts -- --inspect --transpileOnly"
|
||||
"dev": "ts-node-dev ./src/server.ts -- --inspect --transpileOnly"
|
||||
},
|
||||
"engines": {
|
||||
"node": "16.13.2",
|
||||
|
|
|
@ -2,14 +2,14 @@ import { Collection, Db, MongoClient, WithId } from "mongodb";
|
|||
|
||||
process.env.MODE = "dev";
|
||||
|
||||
jest.mock("./init/db", () => ({
|
||||
jest.mock("./src/init/db", () => ({
|
||||
__esModule: true,
|
||||
getDb: (): Db => db,
|
||||
collection: <T>(name: string): Collection<WithId<T>> =>
|
||||
db.collection<WithId<T>>(name),
|
||||
}));
|
||||
|
||||
jest.mock("./utils/logger", () => ({
|
||||
jest.mock("./src/utils/logger", () => ({
|
||||
__esModule: true,
|
||||
default: {
|
||||
error: console.error,
|
||||
|
|
|
@ -31,9 +31,9 @@ export async function connect(): Promise<void> {
|
|||
auth: !(DB_USERNAME && DB_PASSWORD)
|
||||
? undefined
|
||||
: {
|
||||
username: DB_USERNAME,
|
||||
password: DB_PASSWORD,
|
||||
},
|
||||
username: DB_USERNAME,
|
||||
password: DB_PASSWORD,
|
||||
},
|
||||
authMechanism: DB_AUTH_MECHANISM as AuthMechanism | undefined,
|
||||
authSource: DB_AUTH_SOURCE,
|
||||
};
|
|
@ -17,6 +17,7 @@
|
|||
"ts-node": {
|
||||
"files": true
|
||||
},
|
||||
"include": ["./src/**/*"],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"build",
|
||||
|
|
Loading…
Reference in a new issue