Skip to content

Commit

Permalink
build(ember): Update ember test sinon usage (#8694)
Browse files Browse the repository at this point in the history
One of a few steps to try to fix canary tests...
  • Loading branch information
mydea authored Aug 1, 2023
1 parent f833ab2 commit d3abf45
Show file tree
Hide file tree
Showing 3 changed files with 150 additions and 64 deletions.
3 changes: 2 additions & 1 deletion packages/ember/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"ember-maybe-import-regenerator": "~1.0.0",
"ember-qunit": "~6.0.0",
"ember-resolver": "~8.0.3",
"ember-sinon-qunit": "~6.0.0",
"ember-sinon-qunit": "7.1.4",
"ember-source": "~4.8.0",
"ember-source-channel-url": "~2.0.1",
"ember-template-lint": "~4.16.1",
Expand All @@ -75,6 +75,7 @@
"loader.js": "~4.7.0",
"qunit": "~2.19.2",
"qunit-dom": "~2.0.0",
"sinon": "15.2.0",
"webpack": "~5.74.0"
},
"engines": {
Expand Down
10 changes: 3 additions & 7 deletions packages/ember/tests/test-helper.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import sinon from 'sinon';
import * as Sentry from '@sentry/browser';

/**
* Stub Sentry init function before application is imported to avoid actually setting up Sentry and needing a DSN
*/
sinon.stub(Sentry, 'init');

import setupSinon from 'ember-sinon-qunit';
import Application from '../app';
import config from '../config/environment';
import { setApplication } from '@ember/test-helpers';
Expand All @@ -24,5 +18,7 @@ Sentry.addGlobalEventProcessor(event => {

setApplication(Application.create(config.APP));

setupSinon();

start();
QUnit.config.ignoreGlobalErrors = true;
Loading

0 comments on commit d3abf45

Please sign in to comment.