aboutsummaryrefslogtreecommitdiff
path: root/node_modules/dom-converter/scripts/js/test
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-03-27 21:01:33 +0100
committerFlorian Dold <florian.dold@gmail.com>2019-03-27 21:01:33 +0100
commitcc97a4dd2a967e1c2273bd5f4c5f49a5bf2e2585 (patch)
tree92c5d88706a6ffc654d1b133618d357890e7096b /node_modules/dom-converter/scripts/js/test
parent3771b4d6b67b34c130f3a9a1a15f42deefdb2eda (diff)
remove node_modules
Diffstat (limited to 'node_modules/dom-converter/scripts/js/test')
-rw-r--r--node_modules/dom-converter/scripts/js/test/_prepare.js8
-rw-r--r--node_modules/dom-converter/scripts/js/test/domConverter.js22
-rw-r--r--node_modules/dom-converter/scripts/js/test/objectToSaneObject.js108
-rw-r--r--node_modules/dom-converter/scripts/js/test/saneObjectToDom.js73
4 files changed, 0 insertions, 211 deletions
diff --git a/node_modules/dom-converter/scripts/js/test/_prepare.js b/node_modules/dom-converter/scripts/js/test/_prepare.js
deleted file mode 100644
index 7c34f602f..000000000
--- a/node_modules/dom-converter/scripts/js/test/_prepare.js
+++ /dev/null
@@ -1,8 +0,0 @@
-// Generated by CoffeeScript 1.6.3
-var path, pathToLib;
-
-path = require('path');
-
-pathToLib = path.resolve(__dirname, '../../js/lib');
-
-require('little-popo')(pathToLib, false);
diff --git a/node_modules/dom-converter/scripts/js/test/domConverter.js b/node_modules/dom-converter/scripts/js/test/domConverter.js
deleted file mode 100644
index d52e9bfb8..000000000
--- a/node_modules/dom-converter/scripts/js/test/domConverter.js
+++ /dev/null
@@ -1,22 +0,0 @@
-// Generated by CoffeeScript 1.6.3
-var domConverter;
-
-require('./_prepare');
-
-domConverter = mod('domConverter');
-
-describe("input types");
-
-it("should work with objects", function() {
- return domConverter.objectToDom({});
-});
-
-it("should work with arrays", function() {
- return domConverter.objectToDom([]);
-});
-
-it("should not work with other types", function() {
- return (function() {
- return domConverter.objectToDom('a');
- }).should["throw"](Error);
-});
diff --git a/node_modules/dom-converter/scripts/js/test/objectToSaneObject.js b/node_modules/dom-converter/scripts/js/test/objectToSaneObject.js
deleted file mode 100644
index b86f707e6..000000000
--- a/node_modules/dom-converter/scripts/js/test/objectToSaneObject.js
+++ /dev/null
@@ -1,108 +0,0 @@
-// Generated by CoffeeScript 1.6.3
-var objectToSaneObject;
-
-require('./_prepare');
-
-objectToSaneObject = mod('objectToSaneObject');
-
-describe("sanitize()");
-
-test("case: 'text'", function() {
- var expectation, input, ret;
- input = 'text';
- expectation = ['text'];
- ret = objectToSaneObject.sanitize(input);
- return ret.should.be.like(expectation);
-});
-
-test("case: ['text']", function() {
- var expectation, input, ret;
- input = ['text'];
- expectation = ['text'];
- ret = objectToSaneObject.sanitize(input);
- return ret.should.be.like(expectation);
-});
-
-test("case: {a:b}", function() {
- var expectation, input, ret;
- input = {
- a: 'b'
- };
- expectation = [
- {
- a: ['b']
- }
- ];
- ret = objectToSaneObject.sanitize(input);
- return ret.should.be.like(expectation);
-});
-
-test("case: {a:[b: 'c']}", function() {
- var expectation, input, ret;
- input = {
- a: [
- {
- b: 'c'
- }
- ]
- };
- expectation = [
- {
- a: [
- {
- b: ['c']
- }
- ]
- }
- ];
- ret = objectToSaneObject.sanitize(input);
- return ret.should.be.like(expectation);
-});
-
-test("case: {a:b: 'c'}", function() {
- var expectation, input, ret;
- input = {
- a: {
- b: 'c'
- }
- };
- expectation = [
- {
- a: [
- {
- b: ['c']
- }
- ]
- }
- ];
- ret = objectToSaneObject.sanitize(input);
- return ret.should.be.like(expectation);
-});
-
-test("case: {a:b: ['c', d: 'e']}", function() {
- var expectation, input, ret;
- input = {
- a: {
- b: [
- 'c', {
- d: 'e'
- }
- ]
- }
- };
- expectation = [
- {
- a: [
- {
- b: [
- 'c', {
- d: ['e']
- }
- ]
- }
- ]
- }
- ];
- ret = objectToSaneObject.sanitize(input);
- return ret.should.be.like(expectation);
-});
diff --git a/node_modules/dom-converter/scripts/js/test/saneObjectToDom.js b/node_modules/dom-converter/scripts/js/test/saneObjectToDom.js
deleted file mode 100644
index 2562dd26a..000000000
--- a/node_modules/dom-converter/scripts/js/test/saneObjectToDom.js
+++ /dev/null
@@ -1,73 +0,0 @@
-// Generated by CoffeeScript 1.6.3
-var s2d;
-
-require('./_prepare');
-
-s2d = mod('saneObjectToDom');
-
-describe("_arrayToChildren()");
-
-it("should work", function() {
- var a, aChild, b, bChildren, node, ret, _i, _len;
- ret = s2d._arrayToChildren([
- {
- a: 'text'
- }, {
- 'b.someClass': ['b1', 'b2']
- }, {
- c: [
- {
- d: 'text'
- }, {
- e: []
- }
- ]
- }
- ]);
- ret.should.be.an('array');
- ret.should.have.length.of(3);
- for (_i = 0, _len = ret.length; _i < _len; _i++) {
- node = ret[_i];
- node.should.be.an('object');
- node.should.have.keys(['type', 'name', 'attribs', 'children', 'next', 'prev', 'parent']);
- }
- a = ret[0];
- a.children.should.be.an('array');
- a.children.should.have.length.of(1);
- aChild = a.children[0];
- aChild.should.be.an('object');
- aChild.should.be.like({
- type: 'text',
- data: 'text'
- });
- expect(a.prev).to.equal(null);
- expect(a.parent).to.equal(null);
- b = ret[1];
- a.next.should.equal(b);
- b.prev.should.equal(a);
- b.attribs.should.be.like({
- "class": 'someClass'
- });
- bChildren = b.children;
- bChildren[0].should.be.like({
- type: 'text',
- data: 'b1'
- });
- bChildren[1].should.be.like({
- type: 'text',
- data: 'b2'
- });
- return ret.should.have.deep.property('[2].children[1].name', 'e');
-});
-
-describe("_parseTag");
-
-it("should work", function() {
- return s2d._parseTag('tagName#id.c1.c2[a=b, d="1 2 3"]').should.be.like({
- name: 'tagName',
- attribs: {
- id: 'id',
- "class": 'c1 c2'
- }
- });
-});