Skip to content

Broken on Windows #3

@tivac

Description

@tivac

Discovered here: bahmutov/snap-shot#46 (comment)

The isModule check will never succeed on Windows due to checking for a unix-style path.

Example windows error stack

Error: stack-sites
    at stackSites (c:\Users\pcavit\Desktop\snap-shot\node_modules\stack-sites\src\index.js:14:13)
    at snapshot (c:\Users\pcavit\Desktop\snap-shot\node_modules\snap-shot\src\index.js:54:17)
    at Context.it (c:\Users\pcavit\Desktop\snap-shot\test\snap-shot.test.js:6:5)
    at callFn (c:\Users\pcavit\Desktop\snap-shot\node_modules\mocha\lib\runnable.js:345:21)
    at Test.Runnable.run (c:\Users\pcavit\Desktop\snap-shot\node_modules\mocha\lib\runnable.js:337:7)
    at Runner.runTest (c:\Users\pcavit\Desktop\snap-shot\node_modules\mocha\lib\runner.js:444:10)
    at c:\Users\pcavit\Desktop\snap-shot\node_modules\mocha\lib\runner.js:550:12
    at next (c:\Users\pcavit\Desktop\snap-shot\node_modules\mocha\lib\runner.js:361:14)
    at c:\Users\pcavit\Desktop\snap-shot\node_modules\mocha\lib\runner.js:371:7
    at next (c:\Users\pcavit\Desktop\snap-shot\node_modules\mocha\lib\runner.js:295:14)
    at Immediate.<anonymous> (c:\Users\pcavit\Desktop\snap-shot\node_modules\mocha\lib\runner.js:339:5)
    at runCallback (timers.js:666:20)
    at tryOnImmediate (timers.js:639:5)
    at processImmediate [as _immediateCallback] (timers.js:611:5)

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