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 4a96976f
authored
Mar 16, 2015
by
Mick Hansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(test): bad callbacks in hooks test
1 parent
c26c5f4d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
Makefile
test/integration/hooks.test.js
Makefile
View file @
4a96976
...
@@ -17,15 +17,15 @@ else
...
@@ -17,15 +17,15 @@ else
test
:
test
:
make jshint
&&
make teaser
&&
make
test
-unit
&&
make
test
-integration
make jshint
&&
make teaser
&&
make
test
-unit
&&
make
test
-integration
@
if
[
"
$$
GREP"
]
;
then
\
@
if
[
"
$$
GREP"
]
;
then
\
make jshint
&&
make teaser
&&
./node_modules/mocha/bin/mocha --globals setImmediate,clearImmediate --ui tdd --check-leaks --colors -t 1
0
000 --reporter
$(REPORTER)
-g
"
$$
GREP"
$(TESTS)
;
\
make jshint
&&
make teaser
&&
./node_modules/mocha/bin/mocha --globals setImmediate,clearImmediate --ui tdd --check-leaks --colors -t 1
5
000 --reporter
$(REPORTER)
-g
"
$$
GREP"
$(TESTS)
;
\
else
\
else
\
make jshint
&&
make teaser
&&
./node_modules/mocha/bin/mocha --globals setImmediate,clearImmediate --ui tdd --check-leaks --colors -t 1
0
000 --reporter
$(REPORTER)
$(TESTS)
;
\
make jshint
&&
make teaser
&&
./node_modules/mocha/bin/mocha --globals setImmediate,clearImmediate --ui tdd --check-leaks --colors -t 1
5
000 --reporter
$(REPORTER)
$(TESTS)
;
\
fi
fi
endif
endif
# Unit tests
# Unit tests
test-unit
:
test-unit
:
./node_modules/mocha/bin/mocha --globals setImmediate,clearImmediate --ui tdd --check-leaks --colors -t 1
0
000 --reporter
$(REPORTER)
./test/unit/
*
.js ./test/unit/
**
/
*
.js
./node_modules/mocha/bin/mocha --globals setImmediate,clearImmediate --ui tdd --check-leaks --colors -t 1
5
000 --reporter
$(REPORTER)
./test/unit/
*
.js ./test/unit/
**
/
*
.js
test-unit-all
:
test-unit-sqlite test-unit-mysql test-unit-postgres test-unit-postgres-native test-unit-mariadb test-unit-mssql
test-unit-all
:
test-unit-sqlite test-unit-mysql test-unit-postgres test-unit-postgres-native test-unit-mariadb test-unit-mssql
...
@@ -45,9 +45,9 @@ test-unit-postgres-native:
...
@@ -45,9 +45,9 @@ test-unit-postgres-native:
# Integration tests
# Integration tests
test-integration
:
test-integration
:
@
if
[
"
$$
GREP"
]
;
then
\
@
if
[
"
$$
GREP"
]
;
then
\
./node_modules/mocha/bin/mocha --globals setImmediate,clearImmediate --ui tdd --check-leaks --colors -t 1
0
000 --reporter
$(REPORTER)
-g
"
$$
GREP"
$(TESTS)
;
\
./node_modules/mocha/bin/mocha --globals setImmediate,clearImmediate --ui tdd --check-leaks --colors -t 1
5
000 --reporter
$(REPORTER)
-g
"
$$
GREP"
$(TESTS)
;
\
else
\
else
\
./node_modules/mocha/bin/mocha --globals setImmediate,clearImmediate --ui tdd --check-leaks --colors -t 1
0
000 --reporter
$(REPORTER)
$(TESTS)
;
\
./node_modules/mocha/bin/mocha --globals setImmediate,clearImmediate --ui tdd --check-leaks --colors -t 1
5
000 --reporter
$(REPORTER)
$(TESTS)
;
\
fi
fi
test-integration-all
:
test-integration-sqlite test-integration-mysql test-integration-postgres test-integration-postgres-native test-integration-mariadb test-integration-mssql
test-integration-all
:
test-integration-sqlite test-integration-mysql test-integration-postgres test-integration-postgres-native test-integration-mariadb test-integration-mssql
...
@@ -85,7 +85,7 @@ postgres-native:
...
@@ -85,7 +85,7 @@ postgres-native:
# Coverage
# Coverage
cover
:
cover
:
rm -rf coverage
\
rm -rf coverage
\
make teaser
&&
./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha --report lcovonly -- -t 1
0
000 --ui tdd
$(TESTS)
;
\
make teaser
&&
./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha --report lcovonly -- -t 1
5
000 --ui tdd
$(TESTS)
;
\
mariadb-cover
:
mariadb-cover
:
rm -rf coverage
rm -rf coverage
...
...
test/integration/hooks.test.js
View file @
4a96976
...
@@ -5558,9 +5558,9 @@ describe(Support.getTestDialectTeaser('Hooks'), function() {
...
@@ -5558,9 +5558,9 @@ describe(Support.getTestDialectTeaser('Hooks'), function() {
this
.
MiniTasks
.
create
({
mini_title
:
'New MiniTask'
})
this
.
MiniTasks
.
create
({
mini_title
:
'New MiniTask'
})
]).
bind
(
this
).
spread
(
function
(
project
,
task
,
minitask
)
{
]).
bind
(
this
).
spread
(
function
(
project
,
task
,
minitask
)
{
return
this
.
sequelize
.
Promise
.
all
([
return
this
.
sequelize
.
Promise
.
all
([
task
.
addMiniTask
(
minitask
),
task
.
addMiniTask
(
minitask
),
project
.
addTask
(
task
)
project
.
addTask
(
task
)
]).
return
(
project
);
]).
return
(
project
);
}).
then
(
function
(
project
)
{
}).
then
(
function
(
project
)
{
return
project
.
destroy
();
return
project
.
destroy
();
}).
then
(
function
()
{
}).
then
(
function
()
{
...
@@ -5596,7 +5596,6 @@ describe(Support.getTestDialectTeaser('Hooks'), function() {
...
@@ -5596,7 +5596,6 @@ describe(Support.getTestDialectTeaser('Hooks'), function() {
this
.
Tasks
.
beforeDestroy
(
function
(
task
,
options
,
fn
)
{
this
.
Tasks
.
beforeDestroy
(
function
(
task
,
options
,
fn
)
{
beforeTask
=
true
;
beforeTask
=
true
;
fn
(
new
Error
(
'Whoops!'
));
fn
(
new
Error
(
'Whoops!'
));
fn
();
});
});
this
.
Tasks
.
afterDestroy
(
function
(
task
,
options
,
fn
)
{
this
.
Tasks
.
afterDestroy
(
function
(
task
,
options
,
fn
)
{
...
@@ -5606,6 +5605,7 @@ describe(Support.getTestDialectTeaser('Hooks'), function() {
...
@@ -5606,6 +5605,7 @@ describe(Support.getTestDialectTeaser('Hooks'), function() {
this
.
MiniTasks
.
beforeDestroy
(
function
(
minitask
,
options
,
fn
)
{
this
.
MiniTasks
.
beforeDestroy
(
function
(
minitask
,
options
,
fn
)
{
beforeMiniTask
=
true
;
beforeMiniTask
=
true
;
fn
();
});
});
this
.
MiniTasks
.
afterDestroy
(
function
(
minitask
,
options
,
fn
)
{
this
.
MiniTasks
.
afterDestroy
(
function
(
minitask
,
options
,
fn
)
{
...
@@ -5619,9 +5619,9 @@ describe(Support.getTestDialectTeaser('Hooks'), function() {
...
@@ -5619,9 +5619,9 @@ describe(Support.getTestDialectTeaser('Hooks'), function() {
this
.
MiniTasks
.
create
({
mini_title
:
'New MiniTask'
})
this
.
MiniTasks
.
create
({
mini_title
:
'New MiniTask'
})
]).
bind
(
this
).
spread
(
function
(
project
,
task
,
minitask
)
{
]).
bind
(
this
).
spread
(
function
(
project
,
task
,
minitask
)
{
return
this
.
sequelize
.
Promise
.
all
([
return
this
.
sequelize
.
Promise
.
all
([
task
.
addMiniTask
(
minitask
),
task
.
addMiniTask
(
minitask
),
project
.
addTask
(
task
)
project
.
addTask
(
task
)
]).
return
(
project
);
]).
return
(
project
);
}).
then
(
function
(
project
)
{
}).
then
(
function
(
project
)
{
return
project
.
destroy
();
return
project
.
destroy
();
}).
catch
(
function
()
{
}).
catch
(
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