mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-09-23 17:58:45 +00:00
Merge branch 'master' into multi-wiki-support
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
/*\
|
||||
title: test-fakedom.js
|
||||
type: application/javascript
|
||||
tags: [[$:/tags/test-spec]]
|
||||
|
||||
Tests the fakedom that Tiddlywiki occasionally uses.
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
describe("fakedom tests", function() {
|
||||
|
||||
it("properly assigns nodeType based on DOM standards", function() {
|
||||
// According to MDN, ELEMENT_NODE == 1 && TEXT_NODE == 3
|
||||
// There are others, but currently they're not implemented in fakedom
|
||||
expect($tw.fakeDocument.createElement("div").nodeType).toBe(1);
|
||||
expect($tw.fakeDocument.createElement("div").ELEMENT_NODE).toBe(1);
|
||||
expect($tw.fakeDocument.createTextNode("text").nodeType).toBe(3);
|
||||
expect($tw.fakeDocument.createTextNode("text").TEXT_NODE).toBe(3);
|
||||
});
|
||||
});
|
||||
|
||||
})();
|
||||
Reference in New Issue
Block a user