Skip to content

Commit

Permalink
fix: Resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Trygve Lie committed Apr 30, 2021
1 parent 988ec26 commit be49970
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 26 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,19 @@
"@podium/schemas": "5.0.0-next.1",
"@podium/utils": "5.0.0-next.2",
"abslog": "2.4.0",
"ajv": "8.2.0",
"lodash.merge": "4.6.2",
"objobj": "1.0.0",
"ajv": "8.2.0"
"objobj": "1.0.0"
},
"devDependencies": {
"@podium/podlet": "4.4.20",
"@podium/test-utils": "2.3.0",
"@semantic-release/changelog": "5.0.1",
"@semantic-release/commit-analyzer": "8.0.1",
"@semantic-release/git": "9.0.0",
"@semantic-release/github": "7.2.1",
"@semantic-release/npm": "7.1.1",
"@semantic-release/release-notes-generator": "9.0.2",
"semantic-release": "17.4.2",
"@podium/podlet": "4.4.20",
"@podium/test-utils": "2.3.0",
"eslint": "7.25.0",
"eslint-config-airbnb-base": "14.2.1",
"eslint-config-prettier": "8.3.0",
Expand All @@ -65,6 +64,7 @@
"express": "4.17.1",
"hbs": "4.1.2",
"prettier": "2.2.1",
"semantic-release": "17.4.2",
"stoppable": "1.1.0",
"supertest": "6.1.3",
"tap": "15.0.5"
Expand Down
32 changes: 11 additions & 21 deletions tests/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,33 +308,23 @@ test('.js() - passing an instance of AssetsJs - should return set value', t => {

test('.js() - set legal absolute value on "value" argument - should set "js" to set value', t => {
const layout = new Layout(DEFAULT_OPTIONS);
const result = layout.js({ value: 'http://somewhere.remote.com' });
t.equal(result, 'http://somewhere.remote.com');
layout.js({ value: 'http://somewhere.remote.com' });
const result = JSON.parse(JSON.stringify(layout.jsRoute));
t.same(result, [
{ type: 'default', value: 'http://somewhere.remote.com' },
]);
t.end();
});

test('.js() - set illegal value on "value" argument - should throw', t => {
const layout = new Layout(DEFAULT_OPTIONS);
t.throws(() => {
layout.js({ value: '/foo / bar' });
}, 'Value for argument variable "value", "/foo / bar", is not valid');
t.end();
});

test('.js() - call method with "value" argument, then call it a second time with no argument - should return first set value on second call', t => {
const layout = new Layout(DEFAULT_OPTIONS);
layout.js({ value: '/foo/bar' });
const result = layout.js();
t.equal(result, '/foo/bar');
t.end();
});

test('.js() - call method twice with a value for "value" argument - should set both values', t => {
const layout = new Layout(DEFAULT_OPTIONS);
layout.js({ value: '/foo/bar' });
layout.js({ value: '/bar/foo' });
const result = layout.js();
t.equal(result, '/foo/bar');
layout.js({ value: '/bar/foo', type: 'module' });
const result = JSON.parse(JSON.stringify(layout.jsRoute));
t.same(result, [
{ type: 'default', value: '/foo/bar' },
{ type: 'module', value: '/bar/foo' },
]);
t.end();
});

Expand Down

0 comments on commit be49970

Please sign in to comment.