style(tests): code style improvements
MODIFY
packages/core/src/operators/matchPath/matchPath.operator.spec.ts
packages/core/src/operators/matchPath/matchPath.operator.spec.ts
@@ -43,62 +43,44 @@ describe('matchPath operator', () => {
it('matches path with query parameter', () => {
operators = [matchPath('/test')];
Marbles.assert(operators, [
- [
- '-a-b-c-',
- {
+ ['-a-b-c-', {
a: req('/test/bar'),
b: req('/test?foo=bar'),
c: req('/test/?foo=bar')
- }
- ],
- [
- '---b-c-',
- {
+ }],
+ ['---b-c-', {
b: reqMatched('/test?foo=bar'),
c: reqMatched('/test/?foo=bar')
- }
- ]
+ }]
]);
});
it('matches path with url and query parameter', () => {
operators = [matchPath('/test/:foo/bar')];
Marbles.assert(operators, [
- [
- '-a-b--',
- {
+ ['-a-b--', {
a: req('/test/bar'),
b: req('/test/url/bar?foo=bar')
- }
- ],
- [
- '---b--',
- {
+ }],
+ ['---b--', {
b: reqMatched('/test/url/bar?foo=bar', [], { foo: 'url' })
- }
- ]
+ }]
]);
});
it('matches path with additional suffix parameter', () => {
operators = [matchPath('/test', { suffix: '/:foo*' })];
Marbles.assert(operators, [
- [
- '-a-b-c-',
- {
+ ['-a-b-c-', {
a: req('/test'),
b: req('/test/bar'),
c: req('/test/url/bar')
- }
- ],
- [
- '-a-b-c-',
- {
+ }],
+ ['-a-b-c-', {
a: reqMatched('/test'),
b: reqMatched('/test/bar'),
c: reqMatched('/test/url/bar')
- }
- ]
+ }]
]);
});
@@ -109,9 +91,7 @@ describe('matchPath operator', () => {
['-a--', { a: reqMatched('/test', ['/test']) }]
]);
- operators = [
- matchPath('/test/:id/foo', { combiner: true, suffix: '/:foo*' })
- ];
+ operators = [matchPath('/test/:id/foo', { combiner: true, suffix: '/:foo*' })];
Marbles.assert(operators, [
['-a--', { a: req('/test/2/foo') }],
['-a--', { a: reqMatched('/test/2/foo', ['/test/:id/foo'], { id: '2' }) }]

style(tests): code style improvements