Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
reactProj
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marius Nygård
reactProj
Commits
f39f267c
Commit
f39f267c
authored
6 years ago
by
Marius
Browse files
Options
Downloads
Patches
Plain Diff
now?
parent
86475a68
No related branches found
No related tags found
No related merge requests found
Pipeline
#25406
failed
6 years ago
Stage: test
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
server/tests/articleTest.js
+1
-1
1 addition, 1 deletion
server/tests/articleTest.js
server/tests/categoriTest.js
+0
-30
0 additions, 30 deletions
server/tests/categoriTest.js
with
1 addition
and
31 deletions
server/tests/articleTest.js
+
1
−
1
View file @
f39f267c
...
@@ -45,7 +45,7 @@ test('findOne Article', () => {
...
@@ -45,7 +45,7 @@ test('findOne Article', () => {
});
});
});
});
test
(
'
DB test create
article
'
,
()
=>
{
test
(
'
DB test create
category
'
,
()
=>
{
expect
.
assertions
(
1
);
expect
.
assertions
(
1
);
let
c
=
new
CategoryData
(
'
mordi
'
);
let
c
=
new
CategoryData
(
'
mordi
'
);
return
databaseCategory
.
create
(
c
).
then
(
a
=>
expect
(
1
).
toBe
(
1
));
return
databaseCategory
.
create
(
c
).
then
(
a
=>
expect
(
1
).
toBe
(
1
));
...
...
This diff is collapsed.
Click to expand it.
server/tests/categoriTest.js
deleted
100644 → 0
+
0
−
30
View file @
86475a68
// @flow
import
{
CategoryData
,
databaseCategory
,
databaseArticle
,
Article
,
sequelize
}
from
'
../src/models
'
;
import
Sequelize
from
'
sequelize
'
;
beforeAll
(
async
()
=>
{
await
databaseCategory
.
sync
({
force
:
true
});
});
test
(
'
empty test
'
,
()
=>
{
return
expect
(
1
+
2
).
toBe
(
3
);
});
test
(
'
DB test create categori
'
,
()
=>
{
expect
.
assertions
(
1
);
let
c
=
new
CategoryData
(
'
Memessss
'
);
return
databaseCategory
.
create
(
c
).
then
(
a
=>
expect
(
1
).
toBe
(
1
));
});
test
(
'
findOne
'
,
()
=>
{
expect
.
assertions
(
2
);
return
databaseCategory
.
findOne
({
where
:
{
id
:
1
}
}).
then
(
cat
=>
{
expect
(
cat
.
name
).
toMatch
(
'
Memessss
'
);
expect
(
cat
.
name
).
not
.
toMatch
(
'
somthing
'
);
});
});
test
(
'
DB test findAll
'
,
async
()
=>
{
expect
.
assertions
(
1
);
return
databaseCategory
.
findAll
().
then
(
a
=>
expect
(
a
.
length
).
toBe
(
1
));
});
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment