-
Notifications
You must be signed in to change notification settings - Fork 301
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add simple tests for checking plugin version
- Loading branch information
1 parent
ef18e21
commit aa1a3aa
Showing
4 changed files
with
28 additions
and
2 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,24 @@ | ||
module Fable.Tests.Compiler.CompilerHelpers | ||
|
||
open Fable.Core | ||
open Util.Testing | ||
open Fable.Tests.Compiler.Util | ||
open Fable.Tests.Compiler.Util.Compiler | ||
|
||
let tests = | ||
testList "Compiler Helpers" [ | ||
testCase "expectedVersionMatchesActual works for same major version" <| fun _ -> | ||
Fable.CompilerExt.expectedVersionMatchesActual "5.0.0" "5.0.0" |> equal true | ||
Fable.CompilerExt.expectedVersionMatchesActual "5.0.1" "5.0.0" |> equal true | ||
Fable.CompilerExt.expectedVersionMatchesActual "5.1.0" "5.0.0" |> equal true | ||
|
||
testCase "expectedVersionMatchesActual works if actual version is highter than expected version" <| fun _ -> | ||
Fable.CompilerExt.expectedVersionMatchesActual "4.0.0" "5.0.0" |> equal true | ||
Fable.CompilerExt.expectedVersionMatchesActual "4.0.1" "5.0.0" |> equal true | ||
Fable.CompilerExt.expectedVersionMatchesActual "4.1.0" "5.0.0" |> equal true | ||
|
||
testCase "expectedVersionMatchesActual reject if actual version is highter than expected version" <| fun _ -> | ||
Fable.CompilerExt.expectedVersionMatchesActual "4.0.0" "3.0.0" |> equal true | ||
Fable.CompilerExt.expectedVersionMatchesActual "4.0.1" "3.0.0" |> equal true | ||
Fable.CompilerExt.expectedVersionMatchesActual "4.1.0" "3.0.0" |> equal true | ||
] |
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 |
---|---|---|
|
@@ -7,6 +7,7 @@ let allTests = | |
[ | ||
CompilerMessages.tests | ||
AnonRecordInInterface.tests | ||
CompilerHelpers.tests | ||
] | ||
|
||
|
||
|