Skip to content

Commit 98feac8

Browse files
author
amechi101
committed
Fix Test
- Removed debugger statements - Swapped fixture to come before steal clone test #165 (review)
1 parent 6147d97 commit 98feac8

File tree

2 files changed

+15
-17
lines changed

2 files changed

+15
-17
lines changed

fixture.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,9 @@ canReflect.assignMap(fixture, {
6868
});
6969

7070
if(typeof window !== "undefined" && typeof require.resolve !== "function") {
71-
// window.fixture = fixture;
7271

7372
window.fixture = function(){
74-
debugger
75-
canDev.warn("You using the global fixture. Make sure you import can-fixture.");
73+
canDev.warn("You are using the global fixture. Make sure you import can-fixture.");
7674

7775
return fixture.apply(this, arguments);
7876
};

test/fixture_test.js

+14-14
Original file line numberDiff line numberDiff line change
@@ -1958,6 +1958,20 @@ if ("onabort" in XMLHttpRequest._XHR.prototype) {
19581958
xhr.send();
19591959
});
19601960

1961+
testHelpers.dev.devOnlyTest("window.fixture warns when called", function() {
1962+
var teardown = testHelpers.dev.willWarn(/You are using the global fixture\. Make sure you import can-fixture\./, function(message, matched) {
1963+
if(matched) {
1964+
ok(true, "received warning");
1965+
}
1966+
});
1967+
1968+
window.fixture("GET /api/products", function(){
1969+
return {};
1970+
});
1971+
1972+
teardown();
1973+
});
1974+
19611975
testHelpers.dev.devOnlyTest("Works with steal-clone", function() {
19621976
steal.loader.import("steal-clone", { name: "can-fixture" })
19631977
.then(function(clone) {
@@ -1983,17 +1997,3 @@ if ("onabort" in XMLHttpRequest._XHR.prototype) {
19831997

19841998

19851999

1986-
testHelpers.dev.devOnlyTest("window.fixture warns when called", function() {
1987-
debugger
1988-
var teardown = testHelpers.dev.willWarn(/You using the global fixture\. Make sure you import can-fixture\./, function(message, matched) {
1989-
if(matched) {
1990-
ok(true, "received warning");
1991-
}
1992-
});
1993-
1994-
window.fixture("GET /api/products", function(){
1995-
return {};
1996-
});
1997-
1998-
teardown();
1999-
});

0 commit comments

Comments
 (0)