Skip to content

Commit

Permalink
add temporary tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fadi-george committed Feb 14, 2025
1 parent 10bacbb commit 4349444
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ module.exports = async () => {
forceExit: true,
bail: true,
testEnvironment: 'jsdom',
moduleNameMapper: {
'^src/(.*)$': '<rootDir>/src/$1',
'^__test__/(.*)$': '<rootDir>/__test__/$1',
},
// Run these files after jest has been
// installed in the environment
setupFilesAfterEnv: ['<rootDir>/__test__/jest/jest.setup.ts'], // use .js if you prefer JavaScript,
Expand Down
11 changes: 11 additions & 0 deletions src/shared/api/OneSignalApiSW.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { APP_ID } from '__test__/support/constants';
import { OneSignalApiSW } from './OneSignalApiSW';

// Temporary, can remove when adding new tests to ServiceWorker.test.ts
describe('OneSignalApiSW', () => {
test('downloadServerAppConfig', async () => {
test.nock({});
const appConfig = await OneSignalApiSW.downloadServerAppConfig(APP_ID);
expect(appConfig).toBeDefined();
});
});

0 comments on commit 4349444

Please sign in to comment.