Files
cypress/packages/server/test/unit/path_helpers_spec.coffee
T
Gleb Bahmutov ba87bd5dfe Issue 118 - scaffolding in /tmp folder (#128)
* server: detect symlinked case in support file search for #118

* server fix problem found by unit test

* add unit test for paths

* correctly determining files in /tmp for a project

* server: cleanup resolving symlinks
2017-06-06 10:03:49 -04:00

17 lines
529 B
CoffeeScript

require("../spec_helper")
path_helpers = require("#{root}lib/util/path_helpers")
describe "lib/util/path_helpers", ->
context "checkIfResolveChangedRootFolder", ->
check = path_helpers.checkIfResolveChangedRootFolder
it "ignores non-absolute paths", ->
expect(check('foo/index.js', 'foo')).to.be.false()
it "handles paths that do not switch", ->
expect(check('/foo/index.js', '/foo')).to.be.false()
it "detects path switch", ->
expect(check('/private/foo/index.js', '/foo')).to.be.true()