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 8c4acea7
authored
Jan 08, 2014
by
Sascha Depold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
only exec the error test for non sqlite dialects
1 parent
8d343ba3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
11 deletions
test/sequelize.transaction.test.js
test/sequelize.transaction.test.js
View file @
8c4acea
...
@@ -21,19 +21,24 @@ describe(Support.getTestDialectTeaser("Sequelize#transaction"), function () {
...
@@ -21,19 +21,24 @@ describe(Support.getTestDialectTeaser("Sequelize#transaction"), function () {
})
})
describe
(
'error'
,
function
()
{
describe
(
'error'
,
function
()
{
it
(
"gets triggered once an error occurs"
,
function
(
done
)
{
if
(
Support
.
getTestDialect
()
===
'sqlite'
)
{
var
sequelize
=
Support
.
createSequelizeInstance
({
dialect
:
Support
.
getTestDialect
()
})
// not sure if we can test this in sqlite ...
// how could we enforce an authentication error in sqlite?
}
else
{
it
(
"gets triggered once an error occurs"
,
function
(
done
)
{
var
sequelize
=
Support
.
createSequelizeInstance
({
dialect
:
Support
.
getTestDialect
()
})
// lets overwrite the host to get an error
// lets overwrite the host to get an error
sequelize
.
config
.
username
=
'foobarbaz'
sequelize
.
config
.
username
=
'foobarbaz'
sequelize
sequelize
.
transaction
(
function
()
{})
.
transaction
(
function
()
{})
.
error
(
function
(
err
)
{
.
error
(
function
(
err
)
{
expect
(
err
).
to
.
not
.
be
.
undefined
expect
(
err
).
to
.
not
.
be
.
undefined
done
()
done
()
})
})
})
})
}
})
})
describe
(
'callback'
,
function
()
{
describe
(
'callback'
,
function
()
{
...
...
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