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 125a80c3
authored
Jul 23, 2013
by
Sascha Depold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added support
1 parent
39ec54ca
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
1 deletions
test/support.js
test/utils.test.js
test/support.js
0 → 100644
View file @
125a80c
var
fs
=
require
(
'fs'
)
module
.
exports
=
{
getSupportedDialects
:
function
()
{
return
fs
.
readdirSync
(
__dirname
+
'/../lib/dialects'
).
filter
(
function
(
file
)
{
return
((
file
.
indexOf
(
'.js'
)
===
-
1
)
&&
(
file
.
indexOf
(
'abstract'
)
===
-
1
))
})
},
getTestDialect
:
function
()
{
var
envDialect
=
process
.
env
.
DIALECT
||
'mysql'
if
(
envDialect
===
'postgres-native'
)
{
envDialect
=
'postgres'
}
if
(
this
.
getSupportedDialects
().
indexOf
(
envDialect
)
===
-
1
)
{
throw
new
Error
(
'The dialect you have passed is unknown. Did you really mean: '
+
envDialect
)
}
return
envDialect
},
getTestDialectTeaser
:
function
(
moduleName
)
{
var
dialect
=
this
.
getTestDialect
()
if
(
process
.
env
.
DIALECT
===
'postgres-native'
)
{
dialect
=
'postgres-native'
}
return
"["
+
dialect
.
toUpperCase
()
+
"] "
+
moduleName
}
}
test/utils.test.js
View file @
125a80c
var
chai
=
require
(
'chai'
)
var
chai
=
require
(
'chai'
)
,
expect
=
chai
.
expect
,
expect
=
chai
.
expect
,
Utils
=
require
(
__dirname
+
'/../lib/utils'
)
,
Utils
=
require
(
__dirname
+
'/../lib/utils'
)
,
Support
=
require
(
__dirname
+
'/support'
)
describe
(
"Utils"
,
function
()
{
describe
(
Support
.
getTestDialectTeaser
(
"Utils"
)
,
function
()
{
describe
(
'removeCommentsFromFunctionString'
,
function
()
{
describe
(
'removeCommentsFromFunctionString'
,
function
()
{
it
(
"removes line comments at the start of a line"
,
function
()
{
it
(
"removes line comments at the start of a line"
,
function
()
{
var
functionWithLineComments
=
function
()
{
var
functionWithLineComments
=
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