To read a text file that will work when 'npm test' is run as well as 'jest some.test.js'

PHOTO EMBED

Wed May 25 2022 07:07:54 GMT+0000 (Coordinated Universal Time)

Saved by @owent #javascript

const nReadlines = require('n-readlines');
const path = require("path");
const file = path.join(__dirname, "./", "nums-to-test.txt");
const lines = new nReadlines(file);
content_copyCOPY