Move backend source files into src folder (#2943)

This commit is contained in:
Bruce Berrios 2022-05-05 13:27:00 -04:00 committed by GitHub
parent 38ed2f60aa
commit 91220a5bdc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
72 changed files with 12 additions and 11 deletions

View file

@ -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 != '[]'

View file

@ -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) => {

View file

@ -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 () => {

View file

@ -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",

View file

@ -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,

View file

@ -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,
};

View file

@ -17,6 +17,7 @@
"ts-node": {
"files": true
},
"include": ["./src/**/*"],
"exclude": [
"node_modules",
"build",