Skip to content

Commit

Permalink
Revert "fix 2 tests failing"
Browse files Browse the repository at this point in the history
This reverts commit 74289a5.
  • Loading branch information
vemonet committed Aug 11, 2021
1 parent 6fe48d4 commit d68eaca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/function/predefined.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const h2p = require('html2plaintext');

const namespace = 'http://sti2.at#';

const toUpperCase = (data) => data[0].toString().toUpperCase();
const toUpperCase = ([str]) => str.toString().toUpperCase();

const utmToLat = (data) => {
const x = data[0];
Expand Down
6 changes: 3 additions & 3 deletions tests/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ it('Predefined option parameter function mapping', async () => {
const options = {
functions: {
'http://users.ugent.be/~bjdmeest/function/grel.ttl#toLowerCase': function (data) {
return data[0].toString().toLowerCase();
return data.toString().toLowerCase();
},
},
};
Expand Down Expand Up @@ -846,8 +846,8 @@ it('subjFuncMap 2', async () => {
let i = 0;
const options = {
functions: {
'http://myfunc.com/getId': function (data) {
return `http://example.com/${i++}/${data[0]}`;
'http://myfunc.com/getId': function ([str]) {
return `http://example.com/${i++}/${str}`;
},
},
};
Expand Down

0 comments on commit d68eaca

Please sign in to comment.