Skip to content

Commit

Permalink
Fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
aldipermanaetikaputra committed Apr 4, 2023
1 parent 5e42f1a commit a718878
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/LineReader.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ describe('Reads 1000 lines without blank lines', () => {
const skipNumbers: number[] = [];

while (skipNumbers.length < skipTotal) {
const number = random(0, total);
const number = random(1, total);
if (!skipNumbers.includes(number)) {
skipNumbers.push(number);
}
Expand Down Expand Up @@ -124,7 +124,7 @@ describe('Reads 1000 lines without blank lines', () => {
const skipNumbers: number[] = [];

while (skipNumbers.length < skipTotal) {
const number = random(0, total);
const number = random(1, total);
if (!skipNumbers.includes(number)) {
skipNumbers.push(number);
}
Expand Down Expand Up @@ -229,7 +229,7 @@ describe('Reads 1000 lines without blank lines', () => {
const skipNumbers: number[] = [];

while (skipNumbers.length < skipTotal) {
const number = random(0, total);
const number = random(1, total);
if (!skipNumbers.includes(number)) {
skipNumbers.push(number);
}
Expand Down Expand Up @@ -258,7 +258,7 @@ describe('Reads 1000 lines without blank lines', () => {
const skipNumbers: number[] = [];

while (skipNumbers.length < skipTotal) {
const number = random(0, total);
const number = random(1, total);
if (!skipNumbers.includes(number)) {
skipNumbers.push(number);
}
Expand Down Expand Up @@ -415,7 +415,7 @@ describe('Reads 1000 lines with random 500 blank lines', () => {
const skipNumbers: number[] = [];

while (skipNumbers.length < skipTotal) {
const number = random(0, total + blank);
const number = random(1, total + blank);
if (!skipNumbers.includes(number)) {
skipNumbers.push(number);
}
Expand Down Expand Up @@ -447,7 +447,7 @@ describe('Reads 1000 lines with random 500 blank lines', () => {
const skipNumbers: number[] = [];

while (skipNumbers.length < skipTotal) {
const number = random(0, total + blank);
const number = random(1, total + blank);
if (!skipNumbers.includes(number) && lines[number - 1]) {
skipNumbers.push(number);
}
Expand Down Expand Up @@ -594,7 +594,7 @@ describe('Reads 1000 lines with random 500 blank lines', () => {
const skipNumbers: number[] = [];

while (skipNumbers.length < skipTotal) {
const number = random(0, total + blank);
const number = random(1, total + blank);
if (!skipNumbers.includes(number)) {
skipNumbers.push(number);
}
Expand Down Expand Up @@ -626,7 +626,7 @@ describe('Reads 1000 lines with random 500 blank lines', () => {
const skipNumbers: number[] = [];

while (skipNumbers.length < skipTotal) {
const number = random(0, total + blank);
const number = random(1, total + blank);
if (!skipNumbers.includes(number) && lines[number - 1]) {
skipNumbers.push(number);
}
Expand Down

0 comments on commit a718878

Please sign in to comment.