mirror of https://github.com/vitalif/phantomjs
parent
729f12c7d8
commit
e8598a849e
|
@ -22,12 +22,12 @@ TESTS = [
|
|||
'module/system/stdout.js',
|
||||
'module/system/stdin.js',
|
||||
'module/system/stderr.js',
|
||||
'standards/javascript/date.js',
|
||||
'standards/javascript/function.js',
|
||||
'regression/issue12482.js',
|
||||
'run-tests.js'
|
||||
]
|
||||
|
||||
|
||||
def init():
|
||||
global base_path, phantomjs_exe, options
|
||||
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
var assert = require('../../assert');
|
||||
|
||||
// construct date in mm-dd-yyyy format
|
||||
var date = new Date('2012-09-07');
|
||||
assert.isTrue(date.toString() != 'Invalid Date');
|
||||
assert.equal(date.getDate(), 6);
|
||||
assert.equal(date.getMonth(), 8);
|
||||
assert.equal(date.getYear(), 112);
|
||||
|
||||
// parse date in ISO8601 format (yyyy-mm-dd)
|
||||
var date = Date.parse("2012-01-01");
|
||||
assert.equal(date, 1325376000000);
|
|
@ -1,14 +1,4 @@
|
|||
describe("WebKit", function() {
|
||||
it("should construct date in mm-dd-yyyy format", function() {
|
||||
var date = new Date('2012-09-07');
|
||||
expect(date.toString()).toNotEqual('Invalid Date');
|
||||
});
|
||||
|
||||
it("should parse date in ISO8601 format (yyyy-mm-dd)", function() {
|
||||
var date = Date.parse("2012-01-01");
|
||||
expect(date).toEqual(1325376000000);
|
||||
});
|
||||
|
||||
it("should not crash when failing to dirty lines while removing a inline.", function () {
|
||||
var p = require("webpage").create();
|
||||
p.open('../test/webkit-spec/inline-destroy-dirty-lines-crash.html');
|
||||
|
|
Loading…
Reference in New Issue