Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
iamacook committed Jul 23, 2024
1 parent 17838ac commit cc6d836
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/routes/hooks/hooks-notifications.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe('Post Hook Events for Notifications (Unit)', () => {
let authToken: string;
let safeConfigUrl: string;

beforeAll(async () => {
async function initApp(): Promise<void> {
const moduleFixture: TestingModule = await Test.createTestingModule({
imports: [AppModule.register(configuration)],
})
Expand All @@ -86,10 +86,11 @@ describe('Post Hook Events for Notifications (Unit)', () => {
safeConfigUrl = configurationService.getOrThrow('safeConfig.baseUri');

await app.init();
});
}

beforeEach(() => {
beforeEach(async () => {
jest.resetAllMocks();
await initApp();
});

afterAll(async () => {
Expand Down Expand Up @@ -468,7 +469,7 @@ describe('Post Hook Events for Notifications (Unit)', () => {
) {
return Promise.resolve({
status: 200,
data: multisigTransaction,
data: pageBuilder().with('results', [multisigTransaction]).build(),
});
} else {
return Promise.reject(`No matching rule for url: ${url}`);
Expand Down

0 comments on commit cc6d836

Please sign in to comment.