Skip to content

Commit

Permalink
console : add WPT header as requested
Browse files Browse the repository at this point in the history
  • Loading branch information
Wandalen authored and Trott committed Aug 15, 2017
1 parent fad6725 commit 6e86bca
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions test/parallel/test-console-is-a-namespace.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'use strict';

// https://heycam.github.io/webidl/#es-namespaces
// https://console.spec.whatwg.org/#console-namespace
// https://github.com/w3c/web-platform-tests/blob/master/console/console-is-a-namespace.any.js
Expand All @@ -7,6 +8,22 @@ const common = require('../common');
const assert = require('assert');
const { test, assert_equals, assert_true, assert_false } = common.WPT;

assert.doesNotThrow(() => {
global.console = global.console;
});

// Tests above are not from WPT.

/* eslint-disable */
/* WPT Refs:
https://github.com/w3c/web-platform-tests/blob/master/console/console-is-a-namespace.any.js
License: http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright.html
*/

assert.doesNotThrow(() => {
global.console = global.console;
});

test(() => {
assert_true(global.hasOwnProperty('console'));
}, 'console exists on the global object');
Expand Down Expand Up @@ -36,9 +53,5 @@ test(() => {
'The [[Prototype]]\'s [[Prototype]] must be Object Prototype');

}, 'The prototype chain must be correct');
/* eslint-enable */

// Tests below are not from WPT.
assert.doesNotThrow(() => {
global.console = global.console;
});
/* eslint-enable */

0 comments on commit 6e86bca

Please sign in to comment.