-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from unisonweb/fix-bug-with-project-routing
Project Routing: Fix bug where page was refreshed
- Loading branch information
Showing
6 changed files
with
110 additions
and
16 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 |
---|---|---|
|
@@ -48,4 +48,4 @@ | |
}, | ||
"indirect": {} | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
module UnisonLocal.ProjectNameTests exposing (..) | ||
|
||
import Expect | ||
import Test exposing (..) | ||
import UnisonLocal.ProjectName as ProjectName | ||
|
||
|
||
equals : Test | ||
equals = | ||
describe "ProjectName.equals" | ||
[ test "is true for equal names with handles" <| | ||
\_ -> | ||
let | ||
a = | ||
ProjectName.unsafeFromString "@unison/base" | ||
|
||
b = | ||
ProjectName.unsafeFromString "@unison/base" | ||
in | ||
Expect.true "`@unison/base` is equal to `@unison/base`" (ProjectName.equals a b) | ||
, test "is true for equal names without handles" <| | ||
\_ -> | ||
let | ||
a = | ||
ProjectName.unsafeFromString "html" | ||
|
||
b = | ||
ProjectName.unsafeFromString "html" | ||
in | ||
Expect.true "`html` is equal `html`" (ProjectName.equals a b) | ||
, test "is false for non-equal names and handles" <| | ||
\_ -> | ||
let | ||
a = | ||
ProjectName.unsafeFromString "@alice/projectA" | ||
|
||
b = | ||
ProjectName.unsafeFromString "@bob/projectB" | ||
in | ||
Expect.false "@alice/projectA is not equal to @bob/projectB" (ProjectName.equals a b) | ||
, test "is false for non-equal names without handles" <| | ||
\_ -> | ||
let | ||
a = | ||
ProjectName.unsafeFromString "projectA" | ||
|
||
b = | ||
ProjectName.unsafeFromString "projectB" | ||
in | ||
Expect.false "projectA is not equal to projectB" (ProjectName.equals a b) | ||
, test "is false for equal names but not equal handles" <| | ||
\_ -> | ||
let | ||
a = | ||
ProjectName.unsafeFromString "@alice/base" | ||
|
||
b = | ||
ProjectName.unsafeFromString "@bob/base" | ||
in | ||
Expect.false "@alice/base is not equal to @bob/base" (ProjectName.equals a b) | ||
, test "is false for non-equal names but equal handles" <| | ||
\_ -> | ||
let | ||
a = | ||
ProjectName.unsafeFromString "@alice/projectA" | ||
|
||
b = | ||
ProjectName.unsafeFromString "@alice/projectB" | ||
in | ||
Expect.false "@alice/projectA is npt equal to @alice/projectB" (ProjectName.equals a b) | ||
] |