chore: formated tests
Check Deno code / Check Deno code (pull_request) Successful in 5s
Tests / Unit tests (pull_request) Successful in 12s
Tests / Integration tests (pull_request) Successful in 1m9s
Check Deno code / Check Deno code (push) Successful in 6s
Tests / Unit tests (push) Successful in 12s
Tests / Integration tests (push) Successful in 1m13s
Check Deno code / Check Deno code (pull_request) Successful in 5s
Tests / Unit tests (pull_request) Successful in 12s
Tests / Integration tests (pull_request) Successful in 1m9s
Check Deno code / Check Deno code (push) Successful in 6s
Tests / Unit tests (push) Successful in 12s
Tests / Integration tests (push) Successful in 1m13s
This commit was merged in pull request #145.
This commit is contained in:
@@ -63,7 +63,8 @@ Deno.test({
|
||||
});
|
||||
|
||||
Deno.test({
|
||||
name: "integration enseignements: get by composite key returns null when not found",
|
||||
name:
|
||||
"integration enseignements: get by composite key returns null when not found",
|
||||
async fn() {
|
||||
await truncateAll();
|
||||
const row = await testDb
|
||||
@@ -90,9 +91,17 @@ Deno.test({
|
||||
await seedUsers([{ id: "prof.dupont", nom: "Dupont", prenom: "Jean" }]);
|
||||
await seedModules([{ id: "M1", nom: "Mod A" }]);
|
||||
await seedPromotions([{ id: "P1" }]);
|
||||
await seedEnseignements([{ idProf: "prof.dupont", idModule: "M1", idPromo: "P1" }]);
|
||||
await seedEnseignements([{
|
||||
idProf: "prof.dupont",
|
||||
idModule: "M1",
|
||||
idPromo: "P1",
|
||||
}]);
|
||||
await assertRejects(() =>
|
||||
testDb.insert(enseignements).values({ idProf: "prof.dupont", idModule: "M1", idPromo: "P1" })
|
||||
testDb.insert(enseignements).values({
|
||||
idProf: "prof.dupont",
|
||||
idModule: "M1",
|
||||
idPromo: "P1",
|
||||
})
|
||||
);
|
||||
},
|
||||
sanitizeResources: false,
|
||||
@@ -106,7 +115,11 @@ Deno.test({
|
||||
await seedUsers([{ id: "prof.dupont", nom: "Dupont", prenom: "Jean" }]);
|
||||
await seedModules([{ id: "M1", nom: "Mod A" }]);
|
||||
await seedPromotions([{ id: "P1" }]);
|
||||
await seedEnseignements([{ idProf: "prof.dupont", idModule: "M1", idPromo: "P1" }]);
|
||||
await seedEnseignements([{
|
||||
idProf: "prof.dupont",
|
||||
idModule: "M1",
|
||||
idPromo: "P1",
|
||||
}]);
|
||||
|
||||
await testDb
|
||||
.delete(enseignements)
|
||||
|
||||
Reference in New Issue
Block a user