Skip to content

Commit 3c297dc

Browse files
committed
add test for issue 267 #267
1 parent 4becf0e commit 3c297dc

File tree

4 files changed

+1901
-1356
lines changed

4 files changed

+1901
-1356
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"compile:amd": "tsc -t es5 -m amd -d false --outFile ./dist/main.js",
1313
"lint": "eslint ./src/*.ts ./src/**/*.ts",
1414
"---------------": "",
15+
"pretest": "cd ./test/ && yarn install && cd ..",
1516
"test": "yarn run test:target",
1617
"test:src": "cross-env TEST_TARGET=src yarn run test",
1718
"test:dist": "cross-env TEST_TARGET=dist yarn run test",

test/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"packages/*"
55
],
66
"dependencies": {
7-
"@test/test-target": "link:assets/packages/wrapper",
7+
"@test/test-target": "link:./assets/packages/wrapper",
88
"@test/root": "link:../",
99
"@test/last-release": "npm:node-html-parser@latest"
1010
}

test/tests/issues/267.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
const { parse } = require('@test/test-target');
2+
3+
describe.only('issue 267', function () {
4+
it('Incorrect Handling of Empty Class Attributes in SVG Parsing', function () {
5+
const html = `<polygon points="-235.18 1571.95 1014.73 1284.4 1083.46 1590.1 -166.45 1877.65 -235.18 1571.95" fill="#ff8200" class="" design-color="primary"></polygon> `;
6+
const root = parse(html);
7+
root.toString().should.eql(html);
8+
});
9+
});

0 commit comments

Comments
 (0)