Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit a035a929
authored
Nov 25, 2014
by
Mick Hansen
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2617 from mbroadst/fix-timestamp-test
fix hardcoded timezone test
2 parents
22f0f451
40348916
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
test/timezone.test.js
test/timezone.test.js
View file @
a035a92
...
...
@@ -20,12 +20,16 @@ if (dialect !== 'sqlite') {
});
it
(
'returns the same value for current timestamp'
,
function
()
{
var
query
=
"SELECT now() as now"
;
var
now
=
'now()'
;
var
query
=
"SELECT "
+
now
+
" as now"
;
var
startQueryTime
=
Date
.
now
();
return
Promise
.
all
([
this
.
sequelize
.
query
(
query
),
this
.
sequelizeWithTimezone
.
query
(
query
)
]).
spread
(
function
(
now1
,
now2
)
{
expect
(
now1
[
0
].
now
.
getTime
()).
to
.
be
.
closeTo
(
now2
[
0
].
now
.
getTime
(),
50
);
var
elapsedQueryTime
=
Date
.
now
()
-
startQueryTime
;
expect
(
now1
[
0
].
now
.
getTime
()).
to
.
be
.
closeTo
(
now2
[
0
].
now
.
getTime
(),
elapsedQueryTime
);
});
});
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment