use yarn to manage test vendor dependencies, upgrade sinon to v6.3.5

This commit is contained in:
Penar Musaraj
2018-10-04 11:06:14 -04:00
parent 5b56a8cd09
commit cd82107976
8 changed files with 127 additions and 5133 deletions

View File

@ -134,7 +134,7 @@ QUnit.test("selectUp calls _moveSelection with -1", assert => {
QUnit.test("goBack calls history.back", assert => {
var called = false;
sandbox.stub(history, "back", function() {
sandbox.stub(history, "back").callsFake(function() {
called = true;
});

View File

@ -9,7 +9,7 @@ import {
QUnit.module("lib:computed", {
beforeEach() {
sandbox.stub(I18n, "t", function(scope) {
sandbox.stub(I18n, "t").callsFake(function(scope) {
return "%@ translated: " + scope;
});
},

View File

@ -11,7 +11,7 @@
//= require qunit/qunit/qunit
//= require ember-qunit
//= require fake_xml_http_request
//= require route-recognizer
//= require route-recognizer/dist/route-recognizer
//= require pretender/pretender
//= require discourse-loader
//= require preload-store
@ -29,8 +29,7 @@
//= require htmlparser.js
//= require admin
//= require sinon-1.7.1
//= require sinon-qunit-1.0.0
//= require sinon/pkg/sinon
//= require helpers/assertions
//= require helpers/select-kit-helper
@ -45,6 +44,14 @@
//
//= require jquery.magnific-popup.min.js
sinon.config = {
injectIntoThis: false,
injectInto: null,
properties: ["spy", "stub", "mock", "clock", "sandbox"],
useFakeTimers: true,
useFakeServer: false
};
window.inTestEnv = true;
// Stop the message bus so we don't get ajax calls
@ -123,7 +130,7 @@ QUnit.testStart(function(ctx) {
var ps = require("preload-store").default;
ps.reset();
window.sandbox = sinon.sandbox.create();
window.sandbox = sinon;
window.sandbox.stub(ScrollingDOMMethods, "screenNotFull");
window.sandbox.stub(ScrollingDOMMethods, "bindOnScroll");
window.sandbox.stub(ScrollingDOMMethods, "unbindOnScroll");