Sha256: fd453c53352906f79969e28b307400f19ae04824372227a184d26b56e1e64818

Contents?: true

Size: 814 Bytes

Versions: 4

Compression:

Stored size: 814 Bytes

Contents

'use strict';

const common = require('../common');

if (!common.hasIntl) {
  // A handful of the tests fail when ICU is not included.
  common.skip('missing Intl... skipping test');
  return;
}

const path = require('path');
const URL = require('url').URL;
const assert = require('assert');
const attrs = require(path.join(common.fixturesDir, 'url-setter-tests.json'));

for (const attr in attrs) {
  if (attr === 'comment')
    continue;
  const tests = attrs[attr];
  var n = 0;
  for (const test of tests) {
    if (test.skip) continue;
    n++;
    const url = new URL(test.href);
    url[attr] = test.new_value;
    for (const test_attr in test.expected) {
      assert.equal(test.expected[test_attr], url[test_attr],
                   `${n} ${attr} ${test_attr} ${test.href} ${test.comment}`);
    }
  }
}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
node-compiler-0.9.1 vendor/node/test/parallel/test-whatwg-url-setters.js
node-compiler-0.9.0 vendor/node-v7.2.1/test/parallel/test-whatwg-url-setters.js
node-compiler-0.8.0 vendor/node-v7.2.0/test/parallel/test-whatwg-url-setters.js
node-compiler-0.7.0 vendor/node-v7.1.0/test/parallel/test-whatwg-url-setters.js