mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 01:17:16 +08:00
use yarn to manage test vendor dependencies, upgrade sinon to v6.3.5
This commit is contained in:
@ -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;
|
||||
});
|
||||
|
||||
|
@ -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;
|
||||
});
|
||||
},
|
||||
|
@ -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");
|
||||
|
Reference in New Issue
Block a user