mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-04 14:00:22 -05:00
ba87bd5dfe
* 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
17 lines
529 B
CoffeeScript
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()
|