Refactor test URL and add new npm script
Updated the axios GET request in the backend test to use double quotes for consistency. Added a new 'fix' script in package.json for Biome to automatically fix and write unsafe changes. Changed var to let in global-setup.ts for better variable handling.
This commit is contained in:
parent
8ee5410c91
commit
16487e5985
@ -2,7 +2,7 @@ import axios from "axios";
|
||||
|
||||
describe("GET /api", () => {
|
||||
it("should return a message", async () => {
|
||||
const res = await axios.get(`/api`);
|
||||
const res = await axios.get("/api");
|
||||
|
||||
expect(res.status).toBe(200);
|
||||
expect(res.data).toEqual({ message: "Hello API" });
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* eslint-disable */
|
||||
var __TEARDOWN_MESSAGE__: string;
|
||||
let __TEARDOWN_MESSAGE__: string;
|
||||
|
||||
module.exports = async () => {
|
||||
// Start services that that the app needs to run (e.g. database, docker-compose, etc.).
|
||||
|
@ -4,6 +4,7 @@
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"check": "biome check --skip-errors --apply apps",
|
||||
"fix": "biome check --skip-errors --write --unsafe apps",
|
||||
"db:generate": "drizzle-kit generate",
|
||||
"db:migrate": "drizzle-kit migrate",
|
||||
"db:studio": "drizzle-kit studio"
|
||||
|
Loading…
x
Reference in New Issue
Block a user