Import json fixtures with new helper
This commit is contained in:
@@ -5,18 +5,17 @@ import chaiHttp from "chai-http";
|
||||
import server from "../../src/webserver/server.js";
|
||||
import resetDatabase from "../helpers/resetDatabase.js";
|
||||
import createCacheEntry from "../helpers/createCacheEntry.js";
|
||||
const popularShowsSuccess = await import(
|
||||
"../fixtures/popular-show-success-response.json",
|
||||
{
|
||||
assert: { type: "json" }
|
||||
}
|
||||
);
|
||||
import readFixtureContents from "../helpers/importFixture.js";
|
||||
|
||||
chai.use(chaiHttp);
|
||||
|
||||
const popularShowsSuccess = readFixtureContents(
|
||||
"popular-show-success-response.json"
|
||||
);
|
||||
|
||||
describe("As a user I want to get popular shows", () => {
|
||||
beforeEach(() => resetDatabase());
|
||||
beforeEach(() => createCacheEntry("tmdb/pt:1", popularShowsSuccess.default));
|
||||
beforeEach(() => createCacheEntry("tmdb/pt:1", popularShowsSuccess));
|
||||
|
||||
it("should return 200 with the information", done => {
|
||||
chai
|
||||
|
||||
Reference in New Issue
Block a user