UNPKG

@jakguru/phone-object

Version:

An immutable data structure representing a specific phone number and accompanying methods. It contains class and instance methods of creating, parsing, validating, and formatting phone numbers. Based on google-libphonenumber, which is in turn based on Goo

50 lines (46 loc) 1.56 kB
import { assert } from '@japa/assert' import { runFailedTests } from '@japa/run-failed-tests' import { configure, processCliArgs, run } from '@japa/runner' import { specReporter } from '@japa/spec-reporter' /* |-------------------------------------------------------------------------- | Load .env.test file |-------------------------------------------------------------------------- | | Load the .env.test file when running tests. This is extremely important | to avoid polluting your development environment with test env variables. | */ import dotenv from 'dotenv' dotenv.config({ path: '.env.test' }) /* |-------------------------------------------------------------------------- | Configure tests |-------------------------------------------------------------------------- | | The configure method accepts the configuration to configure the Japa | tests runner. | | The first method call "processCliArgs" process the command line arguments | and turns them into a config object. Using this method is not mandatory. | | Please consult japa.dev/runner-config for the config docs. */ configure({ ...processCliArgs(process.argv.slice(2)), ...{ files: ['tests/**/*.spec.ts'], plugins: [assert(), runFailedTests()], reporters: [specReporter()], importer: (filePath) => import(filePath), }, }) /* |-------------------------------------------------------------------------- | Run tests |-------------------------------------------------------------------------- | | The following "run" method is required to execute all the tests. | */ run()