mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-02 06:29:40 +08:00
Updated file header and included tests.
This commit is contained in:
53
js-fixtures/fixtures-tests.ts
Normal file
53
js-fixtures/fixtures-tests.ts
Normal file
@@ -0,0 +1,53 @@
|
||||
/// <reference path="fixtures.d.ts" />
|
||||
|
||||
function test_path() {
|
||||
fixtures.path = "/fixtures";
|
||||
}
|
||||
|
||||
function test_containerId() {
|
||||
fixtures.containerId = "fixtures";
|
||||
}
|
||||
|
||||
function test_body() {
|
||||
if (!fixtures.body()) {
|
||||
console.log('body is empty');
|
||||
}
|
||||
}
|
||||
|
||||
function test_window() {
|
||||
if (!fixtures.window) {
|
||||
console.log('window is not set');
|
||||
}
|
||||
}
|
||||
|
||||
function test_set() {
|
||||
fixtures.set('<div></div>');
|
||||
}
|
||||
|
||||
function test_appendSet() {
|
||||
fixtures.appendSet('<div></div>');
|
||||
}
|
||||
|
||||
function test_preload() {
|
||||
fixtures.preload('/dummy-fixtures.html');
|
||||
}
|
||||
|
||||
function test_load() {
|
||||
fixtures.load('/dummy-fixtures1.html', '/dummy-fixtures2.html');
|
||||
}
|
||||
|
||||
function test_appendLoad() {
|
||||
fixtures.appendLoad('/dummy-fixtures1.html', '/dummy-fixtures2.html');
|
||||
}
|
||||
|
||||
function test_read() {
|
||||
fixtures.read('/dummy-fixtures1.html', '/dummy-fixtures2.html');
|
||||
}
|
||||
|
||||
function test_clearCache() {
|
||||
fixtures.clearCache();
|
||||
}
|
||||
|
||||
function test_clearCleanup() {
|
||||
fixtures.cleanUp();
|
||||
}
|
||||
5
js-fixtures/fixtures.d.ts
vendored
5
js-fixtures/fixtures.d.ts
vendored
@@ -1,3 +1,8 @@
|
||||
// Type definitions for js-fixtures 1.2.0
|
||||
// Project: https://github.com/badunk/js-fixtures
|
||||
// Definitions by: Kazi Manzur Rashid <https://github.com/kazimanzurrashid/>
|
||||
// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare interface Fixtures {
|
||||
path: string;
|
||||
containerId: string;
|
||||
|
||||
Reference in New Issue
Block a user