diff --git a/js-fixtures/fixtures-tests.ts b/js-fixtures/fixtures-tests.ts new file mode 100644 index 0000000000..96c15e5d81 --- /dev/null +++ b/js-fixtures/fixtures-tests.ts @@ -0,0 +1,53 @@ +/// + +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('
'); +} + +function test_appendSet() { + fixtures.appendSet('
'); +} + +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(); +} \ No newline at end of file diff --git a/js-fixtures/fixtures.d.ts b/js-fixtures/fixtures.d.ts index dfce88eb7d..912bc693c1 100644 --- a/js-fixtures/fixtures.d.ts +++ b/js-fixtures/fixtures.d.ts @@ -1,3 +1,8 @@ +// Type definitions for js-fixtures 1.2.0 +// Project: https://github.com/badunk/js-fixtures +// Definitions by: Kazi Manzur Rashid +// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped + declare interface Fixtures { path: string; containerId: string;