Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csbase-dev
sgarest-daemon
Commits
958b4d25
Commit
958b4d25
authored
Dec 23, 2020
by
Renato Figueiro Maia
Browse files
Evitar problemas com o uso do 'jasmine-matchers'.
[SOMA-6916][SOMA-6857]
parent
800fca0d
Pipeline
#69213
passed with stages
in 4 minutes and 34 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
test/package.json
View file @
958b4d25
...
@@ -29,7 +29,6 @@
...
@@ -29,7 +29,6 @@
"eslint-plugin-promise"
:
"^4.2.1"
,
"eslint-plugin-promise"
:
"^4.2.1"
,
"express"
:
"^4.17.1"
,
"express"
:
"^4.17.1"
,
"jasmine"
:
"^3.6.3"
,
"jasmine"
:
"^3.6.3"
,
"jasmine-expect"
:
"^5.0.0"
,
"prettier"
:
"^2.2.1"
"prettier"
:
"^2.2.1"
}
}
}
}
test/spec/rest_spec.js
View file @
958b4d25
...
@@ -212,7 +212,7 @@ describe("Registered SGA", function () {
...
@@ -212,7 +212,7 @@ describe("Registered SGA", function () {
[
regReq
]
=
await
events
.
once
(
regMockup
.
events
,
"
register
"
);
[
regReq
]
=
await
events
.
once
(
regMockup
.
events
,
"
register
"
);
// TODO: why 'jasmine-expect' matchers are not available here?
// TODO: why 'jasmine-expect' matchers are not available here?
//
utils.checkRegistration(regReq, config);
utils
.
checkRegistration
(
regReq
,
config
);
});
});
afterAll
(
utils
.
clearAllResources
);
afterAll
(
utils
.
clearAllResources
);
...
...
test/spec/utils.js
View file @
958b4d25
...
@@ -321,16 +321,17 @@ async function clearAllResources() {
...
@@ -321,16 +321,17 @@ async function clearAllResources() {
function
checkRegistration
(
req
,
config
)
{
function
checkRegistration
(
req
,
config
)
{
const
body
=
req
.
body
;
const
body
=
req
.
body
;
const
uriPattern
=
/http:
\/\/
/
;
expect
(
body
.
name
).
toBe
(
config
.
sga_name
);
expect
(
body
.
name
).
toBe
(
config
.
sga_name
);
expect
(
body
.
type
).
toBe
(
"
machine
"
);
expect
(
body
.
type
).
toBe
(
"
machine
"
);
expect
(
body
.
platform
).
toBe
(
config
.
platform
);
expect
(
body
.
platform
).
toBe
(
config
.
platform
);
expect
(
body
.
project_root_dir
).
toBe
(
config
.
project_root_dir
);
expect
(
body
.
project_root_dir
).
toBe
(
config
.
project_root_dir
);
expect
(
body
.
algorithm_root_dir
).
toBe
(
config
.
algorithm_root_dir
);
expect
(
body
.
algorithm_root_dir
).
toBe
(
config
.
algorithm_root_dir
);
expect
(
body
.
sandbox_root_dir
).
toBe
(
config
.
sandbox_root_dir
);
expect
(
body
.
sandbox_root_dir
).
toBe
(
config
.
sandbox_root_dir
);
expect
(
body
.
actions
.
path
).
to
BeString
(
);
expect
(
body
.
actions
.
path
).
to
Match
(
uriPattern
);
expect
(
body
.
actions
.
paths
).
to
BeString
(
);
expect
(
body
.
actions
.
paths
).
to
Match
(
uriPattern
);
expect
(
body
.
actions
.
job
).
to
BeString
(
);
expect
(
body
.
actions
.
job
).
to
Match
(
uriPattern
);
expect
(
body
.
actions
.
shutdown
).
to
BeString
(
);
expect
(
body
.
actions
.
shutdown
).
to
Match
(
uriPattern
);
expect
(
body
.
resources
).
toEqual
(
jasmine
.
objectContaining
(
config
.
resources
));
expect
(
body
.
resources
).
toEqual
(
jasmine
.
objectContaining
(
config
.
resources
));
expect
(
body
.
extra_config
).
toEqual
(
expect
(
body
.
extra_config
).
toEqual
(
jasmine
.
objectContaining
(
config
.
extra_config
)
jasmine
.
objectContaining
(
config
.
extra_config
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
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 comment