Chore/jest
This commit is contained in:
@@ -1,81 +1,79 @@
|
||||
import { expect } from 'chai'
|
||||
|
||||
import getSensiplanMucus from '../lib/nfp-mucus'
|
||||
|
||||
describe('getSensiplanMucus', () => {
|
||||
it('returns null if there is no value for feeling or texture', () => {
|
||||
expect(getSensiplanMucus()).to.be.null
|
||||
expect(getSensiplanMucus(undefined, 3)).to.be.null
|
||||
expect(getSensiplanMucus(2, undefined)).to.be.null
|
||||
test('returns null if there is no value for feeling or texture', () => {
|
||||
expect(getSensiplanMucus()).toBeNull()
|
||||
expect(getSensiplanMucus(undefined, 3)).toBeNull()
|
||||
expect(getSensiplanMucus(2, undefined)).toBeNull()
|
||||
})
|
||||
|
||||
describe('results in t for:', () => {
|
||||
it('dry feeling and no texture', function () {
|
||||
test('dry feeling and no texture', function () {
|
||||
const sensiplanValue = getSensiplanMucus(0, 0)
|
||||
expect(sensiplanValue).to.eql(0)
|
||||
expect(sensiplanValue).toEqual(0)
|
||||
})
|
||||
})
|
||||
|
||||
describe('results in Ø for:', () => {
|
||||
it('no feeling and no texture', function () {
|
||||
test('no feeling and no texture', function () {
|
||||
const sensiplanValue = getSensiplanMucus(1, 0)
|
||||
expect(sensiplanValue).to.eql(1)
|
||||
expect(sensiplanValue).toEqual(1)
|
||||
})
|
||||
})
|
||||
|
||||
describe('results in f for:', () => {
|
||||
it('wet feeling and no texture', function () {
|
||||
test('wet feeling and no texture', function () {
|
||||
const sensiplanValue = getSensiplanMucus(2, 0)
|
||||
expect(sensiplanValue).to.eql(2)
|
||||
expect(sensiplanValue).toEqual(2)
|
||||
})
|
||||
})
|
||||
|
||||
describe('results in S for:', () => {
|
||||
it('dry feeling and creamy texture', function () {
|
||||
test('dry feeling and creamy texture', function () {
|
||||
const sensiplanValue = getSensiplanMucus(0, 1)
|
||||
expect(sensiplanValue).to.eql(3)
|
||||
expect(sensiplanValue).toEqual(3)
|
||||
})
|
||||
|
||||
it('no feeling and creamy texture', function () {
|
||||
test('no feeling and creamy texture', function () {
|
||||
const sensiplanValue = getSensiplanMucus(1, 1)
|
||||
expect(sensiplanValue).to.eql(3)
|
||||
expect(sensiplanValue).toEqual(3)
|
||||
})
|
||||
|
||||
it('wet feeling and creamy texture', function () {
|
||||
test('wet feeling and creamy texture', function () {
|
||||
const sensiplanValue = getSensiplanMucus(2, 1)
|
||||
expect(sensiplanValue).to.eql(3)
|
||||
expect(sensiplanValue).toEqual(3)
|
||||
})
|
||||
})
|
||||
|
||||
describe('results in +S for:', () => {
|
||||
it('dry feeling and egg white texture', function () {
|
||||
test('dry feeling and egg white texture', function () {
|
||||
const sensiplanValue = getSensiplanMucus(0, 2)
|
||||
expect(sensiplanValue).to.eql(4)
|
||||
expect(sensiplanValue).toEqual(4)
|
||||
})
|
||||
|
||||
it('no feeling and egg white texture', function () {
|
||||
test('no feeling and egg white texture', function () {
|
||||
const sensiplanValue = getSensiplanMucus(1, 2)
|
||||
expect(sensiplanValue).to.eql(4)
|
||||
expect(sensiplanValue).toEqual(4)
|
||||
})
|
||||
|
||||
it('wet feeling and egg white texture', function () {
|
||||
test('wet feeling and egg white texture', function () {
|
||||
const sensiplanValue = getSensiplanMucus(2, 2)
|
||||
expect(sensiplanValue).to.eql(4)
|
||||
expect(sensiplanValue).toEqual(4)
|
||||
})
|
||||
|
||||
it('slippery feeling and egg white texture', function () {
|
||||
test('slippery feeling and egg white texture', function () {
|
||||
const sensiplanValue = getSensiplanMucus(3, 2)
|
||||
expect(sensiplanValue).to.eql(4)
|
||||
expect(sensiplanValue).toEqual(4)
|
||||
})
|
||||
|
||||
it('slippery feeling and creamy texture', function () {
|
||||
test('slippery feeling and creamy texture', function () {
|
||||
const sensiplanValue = getSensiplanMucus(3, 1)
|
||||
expect(sensiplanValue).to.eql(4)
|
||||
expect(sensiplanValue).toEqual(4)
|
||||
})
|
||||
|
||||
it('slippery feeling and no texture', function () {
|
||||
test('slippery feeling and no texture', function () {
|
||||
const sensiplanValue = getSensiplanMucus(3, 0)
|
||||
expect(sensiplanValue).to.eql(4)
|
||||
expect(sensiplanValue).toEqual(4)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user