Skip to content

Commit

Permalink
Update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
iamnapo committed Mar 9, 2020
1 parent 2e0e6f6 commit a0ae8b8
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@
"natural": "^0.6.3"
},
"devDependencies": {
"ava": "^3.4.0",
"ava": "^3.5.0",
"codecov": "^3.6.5",
"dotenv": "^8.2.0",
"eslint": "^6.8.0",
"eslint-config-airbnb": "^18.0.1",
"eslint-config-iamnapo": "^2.2.0",
"eslint-config-iamnapo": "^2.2.1",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.18.3",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^2.5.0",
"eslint-plugin-unicorn": "^16.1.1",
"eslint-plugin-unicorn": "^17.0.1",
"nyc": "^15.0.0"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion src/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ async function create(...args) {
} else {
[, type] = args;
if ((!(typeof type === "string") || (!["concept", "function", "relation"].includes(type)))) {
throw new TypeError(`Invalid input argument. type argument must be one of 'concept', 'function', 'relation'. Value: \`${type}\`.`);
throw new TypeError(`Invalid input argument. type argument must be one of \`concept\`, \`function\`, \`relation\`. Value: \`${type}\`.`);
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/lookup.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function lookup(...args) {
} else {
[, type] = args;
if ((!(typeof uri === "string") || (!["c", "f", "r"].includes(type)))) {
throw new TypeError(`Invalid input argument. type argument must be one of 'c', 'f', 'r'. Value: \`${type}\`.`);
throw new TypeError(`Invalid input argument. type argument must be one of \`c\`, \`f\`, \`r\`. Value: \`${type}\`.`);
}
}

Expand Down Expand Up @@ -62,7 +62,7 @@ async function lookup(...args) {
default:
}
} catch (error) {
result.body = { String: "Couldn't find that in DB." }; // Keep convention that always an object is returned.
result.body = { String: "Couldnt find that in DB." }; // Keep convention that always an object is returned.
result.statusCode = error.response.statusCode;
}
return result;
Expand Down Expand Up @@ -104,7 +104,7 @@ async function lookup(...args) {
};
return { body: result, statusCode: response.statusCode };
} catch (error) {
return { body: { String: "Couldn't find that in DB." }, statusCode: error.response.statusCode };
return { body: { String: "Couldnt find that in DB." }, statusCode: error.response.statusCode };
}
}

Expand Down
8 changes: 4 additions & 4 deletions tests/create.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,25 +101,25 @@ test("creates a single Concept if no type specified", async (t) => {
t.true(result);
});

test("returns correctly if test can't create the concept in the server (with specified type)", async (t) => {
test("returns correctly if test cant create the concept in the server (with specified type)", async (t) => {
const cbm = new CallByMeaning(HOST);
const result = await cbm.create({ desc: "blabla" }, "concept");
t.false(result);
});

test("returns correctly if test can't create the concept in the server (without specified type)", async (t) => {
test("returns correctly if test cant create the concept in the server (without specified type)", async (t) => {
const cbm = new CallByMeaning(HOST);
const result = await cbm.create({ desc: "blabla" });
t.false(result);
});

test("returns correctly if test can't create the function in the server", async (t) => {
test("returns correctly if test cant create the function in the server", async (t) => {
const cbm = new CallByMeaning(HOST);
const result = await cbm.create({ desc: "blabla" }, "function");
t.false(result);
});

test("returns correctly if test can't create the relation in the server", async (t) => {
test("returns correctly if test cant create the relation in the server", async (t) => {
const cbm = new CallByMeaning(HOST);
const result = await cbm.create({ desc: "blabla" }, "relation");
t.false(result);
Expand Down
2 changes: 1 addition & 1 deletion tests/init.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ test("creates an instance of cbm-api", (t) => {
t.true(cbm instanceof CallByMeaning);
});

test("can't be invoked without new", (t) => {
test("cant be invoked without new", (t) => {
t.throws(() => CallByMeaning(HOST));
});

Expand Down
10 changes: 5 additions & 5 deletions tests/lookup.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,25 +66,25 @@ test("looks up a single relation", async (t) => {
t.is(response.statusCode, 200);
});

test("looks up a single concept without specified 'c' type", async (t) => {
test("looks up a single concept without specified `c` type", async (t) => {
const cbm = new CallByMeaning(HOST);
const response = await cbm.lookup("function");
t.is(response.statusCode, 200);
});

test("looks up a single function without specified 'f' type", async (t) => {
test("looks up a single function without specified `f` type", async (t) => {
const cbm = new CallByMeaning(HOST);
const response = await cbm.lookup("now");
t.is(response.statusCode, 200);
});

test("looks up a single relation without specified 'r' type", async (t) => {
test("looks up a single relation without specified `r` type", async (t) => {
const cbm = new CallByMeaning(HOST);
const response = await cbm.lookup("unitConversion");
t.is(response.statusCode, 200);
});

test("returns correctly if test can't find the object in the server (with specified type)", async (t) => {
test("returns correctly if test cant find the object in the server (with specified type)", async (t) => {
const cbm = new CallByMeaning();
t.plan(6);
let response = await cbm.lookup("blabla", "c");
Expand All @@ -98,7 +98,7 @@ test("returns correctly if test can't find the object in the server (with specif
t.true(response.body instanceof Object);
});

test("returns correctly if test can't find the object in the server (without specified type)", async (t) => {
test("returns correctly if test cant find the object in the server (without specified type)", async (t) => {
const cbm = new CallByMeaning();
const response = await cbm.lookup("blabla");
t.is(response.statusCode, 418);
Expand Down

0 comments on commit a0ae8b8

Please # to comment.