Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

throwMissingParameter test added #113

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vitordiricio
Copy link
Contributor

Feature | Change Request | Bug

Description

throwMissingParameter test added

const assert = require("assert")
const throwMissingParameter = require("./throwMissingParameter");

describe("helpers/validate/throwMissingParameter", () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Strings must use singlequote.

Suggested change
describe("helpers/validate/throwMissingParameter", () => {
describe('helpers/validate/throwMissingParameter', () => {

keytwo: "another value"
}

const fields = ["keyone", "keytwo"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 6 spaces but found 12.

Suggested change
const fields = ["keyone", "keytwo"]
const fields = ["keyone", "keytwo"]

const throwMissingParameter = require("./throwMissingParameter");

describe("helpers/validate/throwMissingParameter", () => {
describe("fields should match object keys", () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 2 spaces but found 4.

Suggested change
describe("fields should match object keys", () => {
describe("fields should match object keys", () => {

const object = {
keyone: "value",
keytwo: "another value"
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 6 spaces but found 12.

Suggested change
}
}

@@ -0,0 +1,48 @@
const assert = require("assert")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Strings must use singlequote.

Suggested change
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",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Strings must use singlequote.

Suggested change
keytwo: "another value",
keytwo: 'another value',

describe("fields should match object keys", () => {
it("matching keys", () => {
const object = {
keyone: "value",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Strings must use singlequote.

Suggested change
keyone: "value",
keyone: 'value',

const throwMissingParameter = require("./throwMissingParameter");

describe("helpers/validate/throwMissingParameter", () => {
describe("fields should match object keys", () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Strings must use singlequote.

Suggested change
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 = {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 6 spaces but found 12.

Suggested change
const object = {}
const object = {}


throwMissingParameter(fields, object)
})
it("number of keys in object is greater than fields size", () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Strings must use singlequote.

Suggested change
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"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Strings must use singlequote.

Suggested change
const fields = ["keyone", "randomkey"]
const fields = ['keyone', "randomkey"]

@@ -0,0 +1,48 @@
const assert = require("assert")
const throwMissingParameter = require("./throwMissingParameter");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Strings must use singlequote.

Suggested change
const throwMissingParameter = require("./throwMissingParameter");
const throwMissingParameter = require('./throwMissingParameter');

describe("helpers/validate/throwMissingParameter", () => {
describe("fields should match object keys", () => {
it("matching keys", () => {
const object = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 6 spaces but found 12.

Suggested change
const object = {
const object = {

keytwo: "another value"
}

const fields = ["keyone", "randomkey"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 6 spaces but found 12.

Suggested change
const fields = ["keyone", "randomkey"]
const fields = ["keyone", "randomkey"]


await assertFuncThrows("MissingParameter", throwMissingParameter, fields, object)
})
it("object and fields are empty", async () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Strings must use singlequote.

Suggested change
it("object and fields are empty", async () => {
it('object and fields are empty', async () => {

it("matching keys", () => {
const object = {
keyone: "value",
keytwo: "another value"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Strings must use singlequote.

Suggested change
keytwo: "another value"
keytwo: 'another value'

const fields = ["keyone", "randomkey"]


await assertFuncThrows("MissingParameter", throwMissingParameter, fields, object)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 6 spaces but found 12.

Suggested change
await assertFuncThrows("MissingParameter", throwMissingParameter, fields, object)
await assertFuncThrows("MissingParameter", throwMissingParameter, fields, object)

it("matching keys", () => {
const object = {
keyone: "value",
keytwo: "another value"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 8 spaces but found 16.

Suggested change
keytwo: "another value"
keytwo: "another value"


throwMissingParameter(fields, object)
})
it("number of keys in object is greater than fields size", () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 4 spaces but found 8.

Suggested change
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 () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 4 spaces but found 8.

Suggested change
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",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 8 spaces but found 16.

Suggested change
keytwo: "another value",
keytwo: "another value",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants