Format codebase to ensure consistent style
Ce commit applique un formatage uniforme au code en utilisant des guillemets doubles. Cela améliore la lisibilité et maintient une style cohérente à travers tous les fichiers. De plus, une configuration Biome a été ajoutée pour automatiser ce processus à l'avenir.
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
/* eslint-disable */
|
||||
export default {
|
||||
displayName: 'backend-e2e',
|
||||
preset: '../../jest.preset.js',
|
||||
globalSetup: '<rootDir>/src/support/global-setup.ts',
|
||||
globalTeardown: '<rootDir>/src/support/global-teardown.ts',
|
||||
setupFiles: ['<rootDir>/src/support/test-setup.ts'],
|
||||
testEnvironment: 'node',
|
||||
transform: {
|
||||
'^.+\\.[tj]s$': [
|
||||
'ts-jest',
|
||||
{
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
},
|
||||
],
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'js', 'html'],
|
||||
coverageDirectory: '../../coverage/backend-e2e',
|
||||
displayName: "backend-e2e",
|
||||
preset: "../../jest.preset.js",
|
||||
globalSetup: "<rootDir>/src/support/global-setup.ts",
|
||||
globalTeardown: "<rootDir>/src/support/global-teardown.ts",
|
||||
setupFiles: ["<rootDir>/src/support/test-setup.ts"],
|
||||
testEnvironment: "node",
|
||||
transform: {
|
||||
"^.+\\.[tj]s$": [
|
||||
"ts-jest",
|
||||
{
|
||||
tsconfig: "<rootDir>/tsconfig.spec.json",
|
||||
},
|
||||
],
|
||||
},
|
||||
moduleFileExtensions: ["ts", "js", "html"],
|
||||
coverageDirectory: "../../coverage/backend-e2e",
|
||||
};
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import axios from 'axios';
|
||||
import axios from "axios";
|
||||
|
||||
describe('GET /api', () => {
|
||||
it('should return a message', async () => {
|
||||
const res = await axios.get(`/api`);
|
||||
describe("GET /api", () => {
|
||||
it("should return a message", async () => {
|
||||
const res = await axios.get(`/api`);
|
||||
|
||||
expect(res.status).toBe(200);
|
||||
expect(res.data).toEqual({ message: 'Hello API' });
|
||||
});
|
||||
expect(res.status).toBe(200);
|
||||
expect(res.data).toEqual({ message: "Hello API" });
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/* eslint-disable */
|
||||
var __TEARDOWN_MESSAGE__: string;
|
||||
|
||||
module.exports = async function () {
|
||||
// Start services that that the app needs to run (e.g. database, docker-compose, etc.).
|
||||
console.log('\nSetting up...\n');
|
||||
module.exports = async () => {
|
||||
// Start services that that the app needs to run (e.g. database, docker-compose, etc.).
|
||||
console.log("\nSetting up...\n");
|
||||
|
||||
// Hint: Use `globalThis` to pass variables to global teardown.
|
||||
globalThis.__TEARDOWN_MESSAGE__ = '\nTearing down...\n';
|
||||
// Hint: Use `globalThis` to pass variables to global teardown.
|
||||
globalThis.__TEARDOWN_MESSAGE__ = "\nTearing down...\n";
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* eslint-disable */
|
||||
|
||||
module.exports = async function () {
|
||||
// Put clean up logic here (e.g. stopping services, docker-compose, etc.).
|
||||
// Hint: `globalThis` is shared between setup and teardown.
|
||||
console.log(globalThis.__TEARDOWN_MESSAGE__);
|
||||
module.exports = async () => {
|
||||
// Put clean up logic here (e.g. stopping services, docker-compose, etc.).
|
||||
// Hint: `globalThis` is shared between setup and teardown.
|
||||
console.log(globalThis.__TEARDOWN_MESSAGE__);
|
||||
};
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/* eslint-disable */
|
||||
|
||||
import axios from 'axios';
|
||||
import axios from "axios";
|
||||
|
||||
module.exports = async function () {
|
||||
// Configure axios for tests to use.
|
||||
const host = process.env.HOST ?? 'localhost';
|
||||
const port = process.env.PORT ?? '3000';
|
||||
axios.defaults.baseURL = `http://${host}:${port}`;
|
||||
module.exports = async () => {
|
||||
// Configure axios for tests to use.
|
||||
const host = process.env.HOST ?? "localhost";
|
||||
const port = process.env.PORT ?? "3000";
|
||||
axios.defaults.baseURL = `http://${host}:${port}`;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user