Skip to content

Commit

Permalink
add test for issue 267 #267
Browse files Browse the repository at this point in the history
  • Loading branch information
taoqf committed May 14, 2024
1 parent 4becf0e commit 3c297dc
Show file tree
Hide file tree
Showing 4 changed files with 1,901 additions and 1,356 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"compile:amd": "tsc -t es5 -m amd -d false --outFile ./dist/main.js",
"lint": "eslint ./src/*.ts ./src/**/*.ts",
"---------------": "",
"pretest": "cd ./test/ && yarn install && cd ..",
"test": "yarn run test:target",
"test:src": "cross-env TEST_TARGET=src yarn run test",
"test:dist": "cross-env TEST_TARGET=dist yarn run test",
Expand Down
2 changes: 1 addition & 1 deletion test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"packages/*"
],
"dependencies": {
"@test/test-target": "link:assets/packages/wrapper",
"@test/test-target": "link:./assets/packages/wrapper",
"@test/root": "link:../",
"@test/last-release": "npm:node-html-parser@latest"
}
Expand Down
9 changes: 9 additions & 0 deletions test/tests/issues/267.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const { parse } = require('@test/test-target');

describe.only('issue 267', function () {
it('Incorrect Handling of Empty Class Attributes in SVG Parsing', function () {
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> `;
const root = parse(html);
root.toString().should.eql(html);
});
});
Loading

0 comments on commit 3c297dc

Please sign in to comment.