Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
rootDir: '.',
setupFilesAfterEnv: ['<rootDir>config/jest/enzymeSetup.js'],
roots: ['<rootDir>/packages/core/src', '<rootDir>/packages/widgets/src'],
roots: ['<rootDir>/packages'],
Comment thread
This conversation was marked as resolved.
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { alphaNumeric, invalidAlphaNumericMessage } from '../alphaNumeric.js'
import { testValidatorValues, allowsEmptyValues } from './helpers/index.js'
import { testValidatorValues, allowsEmptyValues } from '../test-helpers'

describe('validator: alphaNumeric', () => {
allowsEmptyValues(alphaNumeric)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { boolean, invalidBooleanMessage } from '../boolean.js'
import { testValidatorValues, allowsEmptyValues } from './helpers/index.js'
import { testValidatorValues, allowsEmptyValues } from '../test-helpers'

describe('validator: boolean', () => {
allowsEmptyValues(boolean)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createCharacterLengthRange } from '../createCharacterLengthRange.js'
import { testValidatorValues, allowsEmptyValues } from './helpers/index.js'
import { testValidatorValues, allowsEmptyValues } from '../test-helpers'
import { requiredArgumentErrorMessage } from '../helpers/index.js'

describe('validator: createCharacterLengthRange', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createEqualTo } from '../createEqualTo.js'
import { allowsEmptyValues } from './helpers/index.js'
import { allowsEmptyValues } from '../test-helpers'
import { requiredArgumentErrorMessage } from '../helpers/index.js'

describe('validator: createEqualTo', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createMaxCharacterLength } from '../createMaxCharacterLength.js'
import { testValidatorValues } from './helpers/index.js'
import { testValidatorValues } from '../test-helpers'

describe('validator: createMaxCharacterLength', () => {
const maxSixChars = createMaxCharacterLength(6)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createMaxNumber } from '../createMaxNumber.js'
import { testValidatorValues } from './helpers/index.js'
import { testValidatorValues } from '../test-helpers'

describe('validator: createMaxNumber', () => {
const maxSix = createMaxNumber(6)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createMinCharacterLength } from '../createMinCharacterLength.js'
import { testValidatorValues } from './helpers/index.js'
import { testValidatorValues } from '../test-helpers'

describe('validator: createMinCharacterLength', () => {
const atLeastSixChars = createMinCharacterLength(6)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createMinNumber } from '../createMinNumber.js'
import { testValidatorValues } from './helpers/index.js'
import { testValidatorValues } from '../test-helpers'

describe('validator: createMinNumber', () => {
const atLeastSix = createMinNumber(6)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { createNumberRange } from '../createNumberRange.js'
import { testValidatorValues, allowsEmptyValues } from './helpers/index.js'
import { testValidatorValues, allowsEmptyValues } from '../test-helpers'
import { requiredArgumentErrorMessage } from '../helpers/index.js'

describe('validator: createNumberRange', () => {
const betweenSixAndTen = createNumberRange(6, 10)
const errorMessage = 'Please enter a number between 6 and 10'
const errorMessage = 'Number cannot be less than 6 or more than 10'

it('should throw an error when lower or upper bound are not a number', () => {
expect(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createPattern, invalidPatternMessage } from '../createPattern.js'
import { allowsEmptyValues } from './helpers/index.js'
import { allowsEmptyValues } from '../test-helpers'

describe('validator: createPattern', () => {
const pattern = /^test$/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { dhis2Password, errorMessages } from '../dhis2Password.js'
import { testValidatorValues, allowsEmptyValues } from './helpers/index.js'
import { testValidatorValues, allowsEmptyValues } from '../test-helpers'

describe('validator: dhis2Password', () => {
allowsEmptyValues(dhis2Password)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { dhis2Username, invalidUsernameMessage } from '../dhis2Username.js'
import { testValidatorValues, allowsEmptyValues } from './helpers/index.js'
import { testValidatorValues, allowsEmptyValues } from '../test-helpers'

describe('validator: dhis2Username', () => {
allowsEmptyValues(dhis2Username)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { email, invalidEmailMessage } from '../email.js'
import { testValidatorValues, allowsEmptyValues } from './helpers/index.js'
import { testValidatorValues, allowsEmptyValues } from '../test-helpers'

/*
* A comprehensive list technically valid and invalid email addresses was
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { hasValue, hasValueMessage } from '../hasValue.js'
import { testValidatorValues } from './helpers/index.js'
import { testValidatorValues } from '../test-helpers'

describe('validator: hasValue', () => {
describe('should return undefined for allowed values', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { integer, invalidIntegerMessage } from '../integer.js'
import { testValidatorValues, allowsEmptyValues } from './helpers/index.js'
import { testValidatorValues, allowsEmptyValues } from '../test-helpers'

describe('validator: integer', () => {
allowsEmptyValues(integer)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
internationalPhoneNumber,
invalidInternationalPhoneNumberMessage,
} from '../internationalPhoneNumber.js'
import { testValidatorValues, allowsEmptyValues } from './helpers/index.js'
import { testValidatorValues, allowsEmptyValues } from '../test-helpers'

describe('validator: internationalPhoneNumber', () => {
allowsEmptyValues(internationalPhoneNumber)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { number, invalidNumberMessage } from '../number.js'
import { testValidatorValues, allowsEmptyValues } from './helpers/index.js'
import { testValidatorValues, allowsEmptyValues } from '../test-helpers'

describe('validator: number', () => {
allowsEmptyValues(number)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { string, invalidStringMessage } from '../string.js'
import { testValidatorValues, allowsEmptyValues } from './helpers/index.js'
import { testValidatorValues, allowsEmptyValues } from '../test-helpers'

describe('validator: string', () => {
allowsEmptyValues(string)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { url, invalidUrlMessage } from '../url.js'
import { testValidatorValues, allowsEmptyValues } from './helpers/index.js'
import { testValidatorValues, allowsEmptyValues } from '../test-helpers'

/**
* List of valid and invalid URIs was sourced from
Expand Down