decide.nolog.cz/tests/test-helper.ts
2023-11-05 12:19:47 +01:00

26 lines
676 B
TypeScript

import Application from 'croodle/app';
import config from 'croodle/config/environment';
import * as QUnit from 'qunit';
import { setApplication } from '@ember/test-helpers';
import { setup } from 'qunit-dom';
import { start } from 'ember-qunit';
import setupSinon from 'ember-sinon-qunit';
document.addEventListener(
'securitypolicyviolation',
function ({ blockedURI, violatedDirective }) {
throw new Error(
'Content-Security-Policy violation detected: ' +
`Violated directive: ${violatedDirective}. ` +
`Blocked URI: ${blockedURI}`,
);
},
);
setApplication(Application.create(config.APP));
setup(QUnit.assert);
setupSinon();
start();