-
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.
Allow Fable 5 to be used with Fable 4 plugins
Co-authored-by: Maxime Mangel <[email protected]>
- Loading branch information
1 parent
04f23a0
commit a97e712
Showing
5 changed files
with
33 additions
and
7 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.0" "5.0.1" |> equal true | ||
Fable.CompilerExt.expectedVersionMatchesActual "5.1.0" "5.1.0" |> equal true | ||
|
||
testCase "expectedVersionMatchesActual works if actual version is higher than expected version" <| fun _ -> | ||
Fable.CompilerExt.expectedVersionMatchesActual "4.0.0" "5.0.0" |> equal true | ||
Fable.CompilerExt.expectedVersionMatchesActual "4.0.0" "5.0.1" |> equal true | ||
Fable.CompilerExt.expectedVersionMatchesActual "4.0.0" "5.1.0" |> equal true | ||
|
||
testCase "expectedVersionMatchesActual reject if actual version is lower than expected version" <| fun _ -> | ||
Fable.CompilerExt.expectedVersionMatchesActual "4.0.0" "3.0.0" |> equal false | ||
Fable.CompilerExt.expectedVersionMatchesActual "4.0.1" "3.0.0" |> equal false | ||
Fable.CompilerExt.expectedVersionMatchesActual "4.1.0" "3.0.0" |> equal false | ||
] |
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 | ||
] | ||
|
||
|
||
|
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