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 c9368843
authored
Apr 22, 2014
by
Mick Hansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(promises): remove test that is outside spec
1 parent
698f5ae6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
9 deletions
lib/promise.js
lib/sequelize.js
test/promise.test.js
test/support.js
lib/promise.js
View file @
c936884
...
@@ -34,6 +34,7 @@ var SequelizePromise = function(resolver) {
...
@@ -34,6 +34,7 @@ var SequelizePromise = function(resolver) {
};
};
util
.
inherits
(
SequelizePromise
,
Promise
)
util
.
inherits
(
SequelizePromise
,
Promise
)
Utils
.
_
.
extend
(
SequelizePromise
,
Promise
)
// Need to hack _then to make sure our promise is chainable
// Need to hack _then to make sure our promise is chainable
SequelizePromise
.
prototype
.
_then
=
function
(
SequelizePromise
.
prototype
.
_then
=
function
(
...
...
lib/sequelize.js
View file @
c936884
...
@@ -817,5 +817,7 @@ module.exports = (function() {
...
@@ -817,5 +817,7 @@ module.exports = (function() {
}
}
}
}
Sequelize
.
Promise
=
Promise
return
Sequelize
return
Sequelize
})()
})()
test/promise.test.js
View file @
c936884
...
@@ -350,15 +350,6 @@ describe(Support.getTestDialectTeaser("Promise"), function () {
...
@@ -350,15 +350,6 @@ describe(Support.getTestDialectTeaser("Promise"), function () {
done
()
done
()
})
})
})
})
it
(
'works for functions with only one return value'
,
function
(
done
)
{
this
.
User
.
find
({
id
:
1
})
.
spread
(
function
(
user
)
{
expect
(
user
.
id
).
to
.
equal
(
1
)
expect
(
arguments
.
length
).
to
.
equal
(
1
)
done
()
})
})
})
})
})
})
...
...
test/support.js
View file @
c936884
...
@@ -5,6 +5,11 @@ var fs = require('fs')
...
@@ -5,6 +5,11 @@ var fs = require('fs')
,
DataTypes
=
require
(
__dirname
+
"/../lib/data-types"
)
,
DataTypes
=
require
(
__dirname
+
"/../lib/data-types"
)
,
Config
=
require
(
__dirname
+
"/config/config"
)
,
Config
=
require
(
__dirname
+
"/config/config"
)
// Make sure errors get thrown when testing
Sequelize
.
Promise
.
onPossiblyUnhandledRejection
(
function
(
e
,
promise
){
throw
e
;
});
var
Support
=
{
var
Support
=
{
Sequelize
:
Sequelize
,
Sequelize
:
Sequelize
,
...
...
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