Skip to content

Just stops after a while and ends the process #25

@darlenya

Description

@darlenya

Hi I used it under Mac OS 10.13.3 with node v9.5.0
When running it with a bigger amount of cycles it crashes after a while.

This example code shows the problem:

const ProgressBar = require('ascii-progress')

const TOTAL_TESTCASE = 251
const TOTAL_STEPS = 628

const barTestcase = new ProgressBar({
    schema:
        'Test cases: [:bar.yellow] :current/:total :percent :elapseds :etas <:name>',
    total: TOTAL_TESTCASE,
    clear: false,
})

const barStep = new ProgressBar({
    schema:
        'Steps:      [:bar.green] :current/:total :percent :elapseds :etas <:name>',
    total: TOTAL_STEPS,
    clear: false,
})

// make the bars Visible in the right order
barTestcase.tick()
barTestcase.tick(-1)

barStep.tick()
barStep.tick(-1)


for(let stepCount =0; stepCount<TOTAL_STEPS; stepCount++){
    barStep.tick()
    for(let tcCount =0; tcCount<TOTAL_TESTCASE; tcCount++){
        barTestcase.tick()
    }
    barTestcase.tick(-TOTAL_TESTCASE)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions