Skip to content

normalize tests#3

Open
rijkerd wants to merge 3 commits into
developfrom
feature/normalize_tests
Open

normalize tests#3
rijkerd wants to merge 3 commits into
developfrom
feature/normalize_tests

Conversation

@rijkerd

@rijkerd rijkerd commented Sep 19, 2019

Copy link
Copy Markdown
Member

No description provided.

Comment thread test/integration/account.http.spec.js Outdated
import request from 'supertest';
import { expect, faker, clear, create } from '@lykmapipo/mongoose-test-helpers';
import { app, mount } from '@lykmapipo/express-common';
// import _ from 'lodash';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Remove comment

const { instance } = Account.schema.paths.accessors;
const { tree } = Account.schema.tree.accessors[0];
describe('Account Accessor Schema', () => {
it('should be an array of embedded subdocuments', () => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This supposed to be Account.path('accessors');

Comment thread test/unit/accessors.schema.spec.js Outdated
const { name } = Account.schema.tree.accessors[0].tree;
const { instance } = Account.schema.paths.accessors.schema.paths.name;
it('should have name field', () => {
const name = Account.path('Account.accessors.name');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This supposed to be Account.path('accessors.name')

Comment thread test/unit/accessors.schema.spec.js Outdated
const { phone } = Account.schema.tree.accessors[0].tree;
const { instance } = Account.schema.paths.accessors.schema.paths.phone;
it('should have phone field', () => {
const phone = Account.path('Account.accessors.phone');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Remove Account on get phone field

Comment thread test/unit/accessors.schema.spec.js Outdated
const { email } = Account.schema.tree.accessors[0].tree;
const { instance } = Account.schema.paths.accessors.schema.paths.email;
it('should have email field', () => {
const email = Account.path('Account.accessors.email');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Remove Account on get email field

Comment thread test/unit/accessors.schema.spec.js Outdated
const { locale } = Account.schema.tree.accessors[0].tree;
const { instance } = Account.schema.paths.accessors.schema.paths.locale;
it('should have locale field', () => {
const locale = Account.path('Account.accessors.locale');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Remove Account on get locale field

Comment thread test/unit/accessors.schema.spec.js Outdated
instance,
} = Account.schema.paths.accessors.schema.paths.verifiedAt;
it('should have verifiedAt field', () => {
const verifiedAt = Account.path('Account.accessors.verifiedAt');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Remove Account on get verifiedAt field

Comment thread test/unit/index.spec.js Outdated
expect(account.name).to.be.equal('account');
expect(account.length).to.be.equal(1);
});
describe('Account should be exported', () => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This has to be a test case i.e use it()

Comment thread test/unit/index.spec.js Outdated
});
expect(Account).to.exist;
expect(Account.fetchAccount).to.exist;
describe('Account should be export Account', () => {

@lykmapipo lykmapipo Sep 20, 2019

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This has to be a test case i.e use it()

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