Skip to content

Commit

Permalink
test(server): move html-to-dom-server.js to server directory
Browse files Browse the repository at this point in the history
This will help organize server (nodejs) and client (browser) tests.

Update npm scripts `test` and `test:coverage` with new test path.
  • Loading branch information
remarkablemark committed Nov 3, 2019
1 parent e4fcb09 commit 3684dac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"lint:fix": "npm run lint -- --fix",
"prepublishOnly": "npm run clean && npm run build",
"release": "standard-version --no-verify",
"test": "mocha",
"test:coverage": "istanbul cover _mocha -- -R spec"
"test": "mocha test/server",
"test:coverage": "istanbul cover _mocha -- test/server"
},
"repository": {
"type": "git",
Expand Down
12 changes: 6 additions & 6 deletions test/html-to-dom-server.js → test/server/server.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const { assert } = require('chai');
const htmlparser = require('htmlparser2');
const cases = require('./cases');
const runTests = require('./helpers/run-tests');
const throwsError = require('./helpers/throws-error');
const { CASE_SENSITIVE_TAG_NAMES } = require('../lib/constants');
const cases = require('../cases');
const runTests = require('../helpers/run-tests');
const throwsError = require('../helpers/throws-error');
const { CASE_SENSITIVE_TAG_NAMES } = require('../../lib/constants');

/**
* Tests case-sensitive tags (SVG) to make sure their case is preserved.
Expand All @@ -21,7 +21,7 @@ function testCaseSensitiveTags(parser) {

describe('server parser', () => {
// before
const parser = require('../');
const parser = require('../..');

// tests
throwsError(parser);
Expand All @@ -33,7 +33,7 @@ describe('client parser in jsdom', () => {
// before
const jsdomify = require('jsdomify').default;
jsdomify.create();
const parser = require('../lib/html-to-dom-client');
const parser = require('../../lib/html-to-dom-client');

// tests
throwsError(parser);
Expand Down

0 comments on commit 3684dac

Please sign in to comment.