-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into route-viewer-links
- Loading branch information
Showing
9 changed files
with
640 additions
and
658 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import '../../test-utils/mock-window-url' | ||
|
||
import { isSubpath } from '../../../lib/components/util/link' | ||
|
||
describe('components > util > Link > isSubpath', () => { | ||
it('should be true on a path that starts with the tracked path', () => { | ||
expect(isSubpath('/', '/')).toBeTruthy() | ||
expect(isSubpath('/trips', '/trips')).toBeTruthy() | ||
expect(isSubpath('/trips/trip123', '/trips')).toBeTruthy() | ||
}) | ||
it('should be false on a path that starts differently than the tracked path', () => { | ||
expect(isSubpath('/trips/trip123', '/route')).toBeFalsy() | ||
expect(isSubpath('/', '/route')).toBeFalsy() | ||
}) | ||
it('should be false if tracking home (/) and on a path that is not home.', () => { | ||
expect(isSubpath('/trips/trip123', '/')).toBeFalsy() | ||
}) | ||
}) |
1,154 changes: 577 additions & 577 deletions
1,154
__tests__/components/viewers/__snapshots__/nearby-view.js.snap
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters