decide.nolog.cz/tests/test-helper.ts

27 lines
676 B
TypeScript
Raw Permalink Normal View History

2020-10-18 22:38:37 +02:00
import Application from 'croodle/app';
import config from 'croodle/config/environment';
import * as QUnit from 'qunit';
2018-12-29 01:27:37 +01:00
import { setApplication } from '@ember/test-helpers';
import { setup } from 'qunit-dom';
2018-12-29 01:27:37 +01:00
import { start } from 'ember-qunit';
import setupSinon from 'ember-sinon-qunit';
2018-12-29 01:27:37 +01:00
document.addEventListener(
'securitypolicyviolation',
function ({ blockedURI, violatedDirective }) {
throw new Error(
'Content-Security-Policy violation detected: ' +
`Violated directive: ${violatedDirective}. ` +
`Blocked URI: ${blockedURI}`,
);
},
);
2019-02-23 22:43:53 +01:00
2018-12-29 01:27:37 +01:00
setApplication(Application.create(config.APP));
2014-07-06 17:37:54 +02:00
setup(QUnit.assert);
setupSinon();
start();