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 d5cef99f
authored
Nov 20, 2014
by
Jan Aagaard Meier
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2597 from mbroadst/test-dialect-support
add dialect support checking to tests
2 parents
5f0c5054
a6c19754
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
test/support.js
test/transaction.test.js
test/support.js
View file @
d5cef99
...
@@ -187,7 +187,8 @@ var Support = {
...
@@ -187,7 +187,8 @@ var Support = {
}
}
};
};
var
sequelize
=
Support
.
createSequelizeInstance
();
var
sequelize
=
Support
.
sequelize
=
Support
.
createSequelizeInstance
();
//
//
// For Postgres' HSTORE functionality and to properly execute it's commands we'll need this...
// For Postgres' HSTORE functionality and to properly execute it's commands we'll need this...
before
(
function
()
{
before
(
function
()
{
...
...
test/transaction.test.js
View file @
d5cef99
...
@@ -4,8 +4,8 @@ var chai = require('chai')
...
@@ -4,8 +4,8 @@ var chai = require('chai')
,
dialect
=
Support
.
getTestDialect
()
,
dialect
=
Support
.
getTestDialect
()
,
Promise
=
require
(
__dirname
+
'/../lib/promise'
)
,
Promise
=
require
(
__dirname
+
'/../lib/promise'
)
,
Transaction
=
require
(
__dirname
+
'/../lib/transaction'
)
,
Transaction
=
require
(
__dirname
+
'/../lib/transaction'
)
,
sinon
=
require
(
'sinon'
)
;
,
sinon
=
require
(
'sinon'
)
,
current
=
Support
.
sequelize
;
describe
(
Support
.
getTestDialectTeaser
(
"Transaction"
),
function
()
{
describe
(
Support
.
getTestDialectTeaser
(
"Transaction"
),
function
()
{
this
.
timeout
(
4000
);
this
.
timeout
(
4000
);
...
@@ -55,7 +55,7 @@ describe(Support.getTestDialectTeaser("Transaction"), function () {
...
@@ -55,7 +55,7 @@ describe(Support.getTestDialectTeaser("Transaction"), function () {
});
});
});
});
if
(
dialect
!==
'sqlite'
)
{
if
(
current
.
dialect
.
supports
.
lock
)
{
describe
(
'row locking'
,
function
()
{
describe
(
'row locking'
,
function
()
{
this
.
timeout
(
10000
);
this
.
timeout
(
10000
);
it
(
'supports for update'
,
function
(
done
)
{
it
(
'supports for update'
,
function
(
done
)
{
...
@@ -75,7 +75,7 @@ describe(Support.getTestDialectTeaser("Transaction"), function () {
...
@@ -75,7 +75,7 @@ describe(Support.getTestDialectTeaser("Transaction"), function () {
where
:
{
where
:
{
username
:
'jan'
username
:
'jan'
}
}
},
{
},
{
lock
:
t1
.
LOCK
.
UPDATE
,
lock
:
t1
.
LOCK
.
UPDATE
,
transaction
:
t1
transaction
:
t1
}).
then
(
function
(
t1Jan
)
{
}).
then
(
function
(
t1Jan
)
{
...
...
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