m.fragment docs
public api tests
This commit is contained in:
parent
53a83a58f2
commit
ec07d76fcd
9 changed files with 291 additions and 18 deletions
|
|
@ -88,15 +88,7 @@ function traverseDirectory(pathname, callback) {
|
|||
}
|
||||
|
||||
//init mocks
|
||||
var domMock = require("../test-utils/domMock")()
|
||||
var xhrMock = require("../test-utils/xhrMock")()
|
||||
var pushStateMock = require("../test-utils/pushStateMock")()
|
||||
|
||||
global.window = {}
|
||||
for (var key in domMock) if (!window[key]) window[key] = domMock[key]
|
||||
for (var key in xhrMock) if (!window[key]) window[key] = xhrMock[key]
|
||||
for (var key in pushStateMock) if (!window[key]) window[key] = pushStateMock[key]
|
||||
|
||||
global.window = require("../test-utils/browserMock")()
|
||||
global.document = window.document
|
||||
global.m = require("../index")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue