throwMissingParameter test added#113
Conversation
| const assert = require("assert") | ||
| const throwMissingParameter = require("./throwMissingParameter"); | ||
|
|
||
| describe("helpers/validate/throwMissingParameter", () => { |
There was a problem hiding this comment.
Codacy has a fix for the issue: Strings must use singlequote.
| describe("helpers/validate/throwMissingParameter", () => { | |
| describe('helpers/validate/throwMissingParameter', () => { |
| keytwo: "another value" | ||
| } | ||
|
|
||
| const fields = ["keyone", "keytwo"] |
There was a problem hiding this comment.
Codacy has a fix for the issue: Expected indentation of 6 spaces but found 12.
| const fields = ["keyone", "keytwo"] | |
| const fields = ["keyone", "keytwo"] |
| const throwMissingParameter = require("./throwMissingParameter"); | ||
|
|
||
| describe("helpers/validate/throwMissingParameter", () => { | ||
| describe("fields should match object keys", () => { |
There was a problem hiding this comment.
Codacy has a fix for the issue: Expected indentation of 2 spaces but found 4.
| describe("fields should match object keys", () => { | |
| describe("fields should match object keys", () => { |
| const object = { | ||
| keyone: "value", | ||
| keytwo: "another value" | ||
| } |
There was a problem hiding this comment.
Codacy has a fix for the issue: Expected indentation of 6 spaces but found 12.
| } | |
| } |
| @@ -0,0 +1,48 @@ | |||
| const assert = require("assert") | |||
There was a problem hiding this comment.
Codacy has a fix for the issue: Strings must use singlequote.
| const assert = require("assert") | |
| const assert = require('assert') |
| it("number of keys in object is greater than fields size", () => { | ||
| const object = { | ||
| keyone: "value", | ||
| keytwo: "another value", |
There was a problem hiding this comment.
Codacy has a fix for the issue: Strings must use singlequote.
| keytwo: "another value", | |
| keytwo: 'another value', |
| describe("fields should match object keys", () => { | ||
| it("matching keys", () => { | ||
| const object = { | ||
| keyone: "value", |
There was a problem hiding this comment.
Codacy has a fix for the issue: Strings must use singlequote.
| keyone: "value", | |
| keyone: 'value', |
| const throwMissingParameter = require("./throwMissingParameter"); | ||
|
|
||
| describe("helpers/validate/throwMissingParameter", () => { | ||
| describe("fields should match object keys", () => { |
There was a problem hiding this comment.
Codacy has a fix for the issue: Strings must use singlequote.
| describe("fields should match object keys", () => { | |
| describe('fields should match object keys', () => { |
| await assertFuncThrows("MissingParameter", throwMissingParameter, fields, object) | ||
| }) | ||
| it("object and fields are empty", async () => { | ||
| const object = {} |
There was a problem hiding this comment.
Codacy has a fix for the issue: Expected indentation of 6 spaces but found 12.
| const object = {} | |
| const object = {} |
|
|
||
| throwMissingParameter(fields, object) | ||
| }) | ||
| it("number of keys in object is greater than fields size", () => { |
There was a problem hiding this comment.
Codacy has a fix for the issue: Strings must use singlequote.
| it("number of keys in object is greater than fields size", () => { | |
| it('number of keys in object is greater than fields size', () => { |
| keytwo: "another value" | ||
| } | ||
|
|
||
| const fields = ["keyone", "randomkey"] |
There was a problem hiding this comment.
Codacy has a fix for the issue: Strings must use singlequote.
| const fields = ["keyone", "randomkey"] | |
| const fields = ['keyone', "randomkey"] |
| @@ -0,0 +1,48 @@ | |||
| const assert = require("assert") | |||
| const throwMissingParameter = require("./throwMissingParameter"); | |||
There was a problem hiding this comment.
Codacy has a fix for the issue: Strings must use singlequote.
| const throwMissingParameter = require("./throwMissingParameter"); | |
| const throwMissingParameter = require('./throwMissingParameter'); |
| describe("helpers/validate/throwMissingParameter", () => { | ||
| describe("fields should match object keys", () => { | ||
| it("matching keys", () => { | ||
| const object = { |
There was a problem hiding this comment.
Codacy has a fix for the issue: Expected indentation of 6 spaces but found 12.
| const object = { | |
| const object = { |
| keytwo: "another value" | ||
| } | ||
|
|
||
| const fields = ["keyone", "randomkey"] |
There was a problem hiding this comment.
Codacy has a fix for the issue: Expected indentation of 6 spaces but found 12.
| const fields = ["keyone", "randomkey"] | |
| const fields = ["keyone", "randomkey"] |
|
|
||
| await assertFuncThrows("MissingParameter", throwMissingParameter, fields, object) | ||
| }) | ||
| it("object and fields are empty", async () => { |
There was a problem hiding this comment.
Codacy has a fix for the issue: Strings must use singlequote.
| it("object and fields are empty", async () => { | |
| it('object and fields are empty', async () => { |
| it("matching keys", () => { | ||
| const object = { | ||
| keyone: "value", | ||
| keytwo: "another value" |
There was a problem hiding this comment.
Codacy has a fix for the issue: Strings must use singlequote.
| keytwo: "another value" | |
| keytwo: 'another value' |
| const fields = ["keyone", "randomkey"] | ||
|
|
||
|
|
||
| await assertFuncThrows("MissingParameter", throwMissingParameter, fields, object) |
There was a problem hiding this comment.
Codacy has a fix for the issue: Expected indentation of 6 spaces but found 12.
| await assertFuncThrows("MissingParameter", throwMissingParameter, fields, object) | |
| await assertFuncThrows("MissingParameter", throwMissingParameter, fields, object) |
| it("matching keys", () => { | ||
| const object = { | ||
| keyone: "value", | ||
| keytwo: "another value" |
There was a problem hiding this comment.
Codacy has a fix for the issue: Expected indentation of 8 spaces but found 16.
| keytwo: "another value" | |
| keytwo: "another value" |
|
|
||
| throwMissingParameter(fields, object) | ||
| }) | ||
| it("number of keys in object is greater than fields size", () => { |
There was a problem hiding this comment.
Codacy has a fix for the issue: Expected indentation of 4 spaces but found 8.
| it("number of keys in object is greater than fields size", () => { | |
| it("number of keys in object is greater than fields size", () => { |
|
|
||
| throwMissingParameter(fields, object) | ||
| }) | ||
| it("doesn't matching keys", async () => { |
There was a problem hiding this comment.
Codacy has a fix for the issue: Expected indentation of 4 spaces but found 8.
| it("doesn't matching keys", async () => { | |
| it("doesn't matching keys", async () => { |
| it("number of keys in object is greater than fields size", () => { | ||
| const object = { | ||
| keyone: "value", | ||
| keytwo: "another value", |
There was a problem hiding this comment.
Codacy has a fix for the issue: Expected indentation of 8 spaces but found 16.
| keytwo: "another value", | |
| keytwo: "another value", |
Feature | Change Request | Bug
Description
throwMissingParameter test added