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 1133077c
authored
Jul 30, 2013
by
Daniel Durante
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some async issues with mocha tests.
1 parent
7e565cd7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
18 deletions
test/postgres/associations.test.js
test/query-interface.test.js
test/support.js
test/postgres/associations.test.js
View file @
1133077
...
@@ -9,11 +9,6 @@ chai.Assertion.includeStack = true
...
@@ -9,11 +9,6 @@ chai.Assertion.includeStack = true
if
(
dialect
.
match
(
/^postgres/
))
{
if
(
dialect
.
match
(
/^postgres/
))
{
describe
(
'[POSTGRES Specific] associations'
,
function
()
{
describe
(
'[POSTGRES Specific] associations'
,
function
()
{
beforeEach
(
function
(
done
)
{
this
.
sequelize
.
options
.
quoteIdentifier
=
true
done
()
})
describe
(
'many-to-many'
,
function
()
{
describe
(
'many-to-many'
,
function
()
{
describe
(
'where tables have the same prefix'
,
function
()
{
describe
(
'where tables have the same prefix'
,
function
()
{
it
(
"should create a table wp_table1wp_table2s"
,
function
(
done
)
{
it
(
"should create a table wp_table1wp_table2s"
,
function
(
done
)
{
...
@@ -76,17 +71,15 @@ if (dialect.match(/^postgres/)) {
...
@@ -76,17 +71,15 @@ if (dialect.match(/^postgres/)) {
tasks
[
tasks
.
length
]
=
{
name
:
'Task'
+
Math
.
random
()}
tasks
[
tasks
.
length
]
=
{
name
:
'Task'
+
Math
.
random
()}
}
}
self
.
sequelize
.
getQueryInterface
().
dropAllTables
().
success
(
function
()
{
self
.
User
.
sync
({
force
:
true
}).
success
(
function
()
{
self
.
User
.
sync
({
force
:
true
}).
success
(
function
()
{
self
.
Task
.
sync
({
force
:
true
}).
success
(
function
()
{
self
.
Task
.
sync
({
force
:
true
}).
success
(
function
()
{
self
.
User
.
bulkCreate
(
users
).
success
(
function
()
{
self
.
User
.
bulkCreate
(
users
).
success
(
function
()
{
self
.
Task
.
bulkCreate
(
tasks
).
success
(
function
()
{
self
.
Task
.
bulkCreate
(
tasks
).
success
(
function
()
{
self
.
User
.
all
().
success
(
function
(
_users
)
{
self
.
User
.
all
().
success
(
function
(
_users
)
{
self
.
Task
.
all
().
success
(
function
(
_tasks
)
{
self
.
Task
.
all
().
success
(
function
(
_tasks
)
{
self
.
user
=
_users
[
0
]
self
.
user
=
_users
[
0
]
self
.
task
=
_tasks
[
0
]
self
.
task
=
_tasks
[
0
]
done
()
done
()
})
})
})
})
})
})
})
...
...
test/query-interface.test.js
View file @
1133077
...
@@ -48,7 +48,7 @@ describe(Support.getTestDialectTeaser("QueryInterface"), function () {
...
@@ -48,7 +48,7 @@ describe(Support.getTestDialectTeaser("QueryInterface"), function () {
})
})
describe
(
'indexes'
,
function
()
{
describe
(
'indexes'
,
function
()
{
before
(
function
(
done
)
{
before
Each
(
function
(
done
)
{
var
self
=
this
var
self
=
this
this
.
queryInterface
.
dropTable
(
'Users'
).
success
(
function
()
{
this
.
queryInterface
.
dropTable
(
'Users'
).
success
(
function
()
{
self
.
queryInterface
.
createTable
(
'Users'
,
{
self
.
queryInterface
.
createTable
(
'Users'
,
{
...
...
test/support.js
View file @
1133077
...
@@ -121,7 +121,7 @@ before(function(done) {
...
@@ -121,7 +121,7 @@ before(function(done) {
done
()
done
()
})
})
after
Each
(
function
(
done
)
{
before
Each
(
function
(
done
)
{
Support
.
clearDatabase
(
this
.
sequelize
,
function
()
{
Support
.
clearDatabase
(
this
.
sequelize
,
function
()
{
done
()
done
()
})
})
...
...
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