Skip to content

Commit

Permalink
Use the Official ECMAScript Conformance Test Suite (test262) to test …
Browse files Browse the repository at this point in the history
…the compatibility with the built-in Date constructor.

Current results: 319/449 passes for timezoned-date, 425/449 for built-in Date (Node v4.1.0, Windows 7 x64)
  • Loading branch information
thorn0 committed Sep 19, 2015
1 parent 6519bb3 commit 4da74bd
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/node_modules/
/lib/
/test262/test262/
/test262/prelude.js
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
.gitignore
.eslintrc
.editorconfig
.npmignore
/test262/
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,17 @@
"babel-eslint": "^4.1.3",
"eslint": "^1.5.0",
"jshint": "~1.1.0",
"mocha": "~1.9.0"
"mocha": "~1.9.0",
"test262-harness": "^1.5.5"
},
"scripts": {
"lint": "eslint src --fix",
"test": "mocha",
"pretest262": "find test262/test262 -maxdepth 0 || git clone https://github.com/tc39/test262.git test262/test262 --depth 1",
"test262": "cat test262/prelude.prefix lib/index.js test262/prelude.suffix > test262/prelude.js && test262-harness --prelude test262/prelude.js \"test262/test262/test/built-ins/Date/**/*.js\"",
"pretest262native": "find test262/test262 -maxdepth 0 || git clone https://github.com/tc39/test262.git test262/test262 --depth 1",
"test262native": "test262-harness \"test262/test262/test/built-ins/Date/**/*.js\"",
"build": "babel --optional es7.classProperties src --out-dir lib",
"watch": "babel --optional es7.classProperties src --watch --out-dir lib"
}
}
}
4 changes: 4 additions & 0 deletions test262/prelude.prefix
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
var module = {
exports: {}
};
(function(global, module, exports) {
3 changes: 3 additions & 0 deletions test262/prelude.suffix
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
})(this, module, module.exports);

Date = module.exports.makeConstructor();

0 comments on commit 4da74bd

Please sign in to comment.