mjackson/expect

View on GitHub
modules/__tests__/toBeLessThan-test.js

Summary

Maintainability
A
3 hrs
Test Coverage
import expect from '../index'

describe('toBeLessThan', () => {
  it('does not throw when the actual value is less than the expected value', () => {
    expect(() => {
      expect(2).toBeLessThan(3)
    }).toNotThrow()
  })

  it('throws when the actual value is not less than the expected value', () => {
    expect(() => {
      expect(3).toBeLessThan(2)
    }).toThrow(/to be less than/)
  })
})