Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
duniter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
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
nodes
typescript
duniter
Commits
9598ed09
Commit
9598ed09
authored
7 years ago
by
Cédric Moreau
Browse files
Options
Downloads
Patches
Plain Diff
[fix]
#1037
Local tests fix
parent
113feaee
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/fast/block_local.js
+5
-2
5 additions, 2 deletions
test/fast/block_local.js
with
5 additions
and
2 deletions
test/fast/block_local.js
+
5
−
2
View file @
9598ed09
...
@@ -4,7 +4,7 @@ const should = require('should');
...
@@ -4,7 +4,7 @@ const should = require('should');
const
parsers
=
require
(
'
duniter-common
'
).
parsers
;
const
parsers
=
require
(
'
duniter-common
'
).
parsers
;
const
indexer
=
require
(
'
../../app/lib/indexer
'
).
Indexer
const
indexer
=
require
(
'
../../app/lib/indexer
'
).
Indexer
const
LOCAL_RULES
=
require
(
'
../../app/lib/rules/local_rules
'
).
LOCAL_RULES_FUNCTIONS
const
LOCAL_RULES
=
require
(
'
../../app/lib/rules/local_rules
'
).
LOCAL_RULES_FUNCTIONS
const
CHECK
=
require
(
'
../../app/lib/rules
'
).
CHECK
const
ALIAS
=
require
(
'
../../app/lib/rules
'
).
ALIAS
const
blocks
=
require
(
'
../data/blocks.js
'
);
const
blocks
=
require
(
'
../data/blocks.js
'
);
const
parser
=
parsers
.
parseBlock
;
const
parser
=
parsers
.
parseBlock
;
const
Block
=
require
(
'
duniter-common
'
).
document
.
Block
const
Block
=
require
(
'
duniter-common
'
).
document
.
Block
...
@@ -25,7 +25,7 @@ const conf = {
...
@@ -25,7 +25,7 @@ const conf = {
describe
(
"
Block local coherence
"
,
function
(){
describe
(
"
Block local coherence
"
,
function
(){
it
(
'
a valid block should be well formatted
'
,
test
(
CHECK
.
ASYNC
.
ALL_LOCAL_BUT_POW_AND_SIGNATURE
,
blocks
.
VALID_ROOT
));
it
(
'
a valid block should be well formatted
'
,
test
(
ALIAS
.
ALL_LOCAL_BUT_POW_AND_SIGNATURE
,
blocks
.
VALID_ROOT
));
describe
(
"
should be rejected
"
,
function
(){
describe
(
"
should be rejected
"
,
function
(){
...
@@ -99,6 +99,9 @@ function test (rule, raw, expectedMessage) {
...
@@ -99,6 +99,9 @@ function test (rule, raw, expectedMessage) {
if
(
e
.
uerr
)
{
if
(
e
.
uerr
)
{
// This is a controlled error
// This is a controlled error
e
.
uerr
.
message
.
should
.
equal
(
expectedMessage
);
e
.
uerr
.
message
.
should
.
equal
(
expectedMessage
);
}
else
if
(
e
)
{
// This is a controlled error
e
.
message
.
should
.
equal
(
expectedMessage
);
}
else
{
}
else
{
// throw Error(e)
// throw Error(e)
// Display non wrapped errors (wrapped error is an error in constants.js)
// Display non wrapped errors (wrapped error is an error in constants.js)
...
...
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