Merge pull request #6457 from pmusaraj/yarn-manage-test-vendor-dependencies

DEV: Use Yarn managed test vendor dependencies
This commit is contained in:
Guo Xiang Tan
2018-10-08 09:26:26 +08:00
committed by GitHub
11 changed files with 127 additions and 5312 deletions
@@ -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;
});
+1 -1
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;
});
},
+11 -5
View File
@@ -1,7 +1,6 @@
/*global document, sinon, QUnit, Logster */
//= require env
//= require probes
//= require jquery.debug
//= require jquery.ui.widget
//= require handlebars
@@ -11,7 +10,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 +28,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 +43,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 +129,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");