Prefer path
over Path
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
/* eslint-env node */
|
/* eslint-env node */
|
||||||
|
|
||||||
const Path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
const {
|
const {
|
||||||
escapeRegExp,
|
escapeRegExp,
|
||||||
@@ -13,7 +13,7 @@ const { compose } = require('lodash/fp');
|
|||||||
const PHONE_NUMBER_PATTERN = /\+\d{7,12}(\d{3})/g;
|
const PHONE_NUMBER_PATTERN = /\+\d{7,12}(\d{3})/g;
|
||||||
const GROUP_ID_PATTERN = /(group\()([^)]+)(\))/g;
|
const GROUP_ID_PATTERN = /(group\()([^)]+)(\))/g;
|
||||||
|
|
||||||
const APP_ROOT_PATH = Path.join(__dirname, '..', '..', '..');
|
const APP_ROOT_PATH = path.join(__dirname, '..', '..', '..');
|
||||||
const APP_ROOT_PATH_PATTERN = (() => {
|
const APP_ROOT_PATH_PATTERN = (() => {
|
||||||
try {
|
try {
|
||||||
// Safe `String::replaceAll`:
|
// Safe `String::replaceAll`:
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
const Path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
const { assert } = require('chai');
|
const { assert } = require('chai');
|
||||||
|
|
||||||
const Privacy = require('../../js/modules/privacy');
|
const Privacy = require('../../js/modules/privacy');
|
||||||
|
|
||||||
|
|
||||||
const APP_ROOT_PATH = Path.join(__dirname, '..', '..', '..');
|
const APP_ROOT_PATH = path.join(__dirname, '..', '..', '..');
|
||||||
|
|
||||||
describe('Privacy', () => {
|
describe('Privacy', () => {
|
||||||
describe('redactPhoneNumbers', () => {
|
describe('redactPhoneNumbers', () => {
|
||||||
|
Reference in New Issue
Block a user