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 0ec26180
authored
Mar 28, 2016
by
Sushant
Committed by
Jan Aagaard Meier
May 16, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(tests) dialect needs to be supplied explicitly
1 parent
52a675a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
4 deletions
test/unit/sequelize.test.js
test/unit/sequelize.test.js
View file @
0ec2618
...
@@ -3,9 +3,26 @@
...
@@ -3,9 +3,26 @@
/* jshint -W030 */
/* jshint -W030 */
var
chai
=
require
(
'chai'
)
var
chai
=
require
(
'chai'
)
,
expect
=
chai
.
expect
,
expect
=
chai
.
expect
,
Sequelize
=
require
(
__dirname
+
'/../../index'
);
,
Support
=
require
(
__dirname
+
'/support'
)
,
Sequelize
=
Support
.
Sequelize
;
describe
(
'Sequelize constructor'
,
function
()
{
describe
(
'options'
,
function
()
{
it
(
'throw error when no dialect is supplied'
,
function
()
{
expect
(
function
()
{
new
Sequelize
(
'localhost'
,
'test'
,
'test'
);
}).
to
.
throw
(
Error
);
});
it
(
'works when dialect explicitly supplied'
,
function
()
{
expect
(
function
()
{
new
Sequelize
(
'localhost'
,
'test'
,
'test'
,
{
dialect
:
'mysql'
});
}).
not
.
to
.
throw
(
Error
);
});
});
describe
(
'sequelize constructor'
,
function
()
{
it
(
'should support database, username, password, options'
,
function
()
{
it
(
'should support database, username, password, options'
,
function
()
{
var
database
=
Math
.
random
().
toString
()
var
database
=
Math
.
random
().
toString
()
,
username
=
Math
.
random
().
toString
()
,
username
=
Math
.
random
().
toString
()
...
@@ -65,4 +82,4 @@ describe('sequelize constructor', function () {
...
@@ -65,4 +82,4 @@ describe('sequelize constructor', function () {
expect
(
sequelize
.
config
.
host
).
to
.
equal
(
host
);
expect
(
sequelize
.
config
.
host
).
to
.
equal
(
host
);
expect
(
sequelize
.
config
.
port
).
to
.
equal
(
port
);
expect
(
sequelize
.
config
.
port
).
to
.
equal
(
port
);
});
});
});
});
\ No newline at end of file
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