jgrund / fable-jest Goto Github PK
View Code? Open in Web Editor NEWFable bindings for Jest
License: MIT License
Fable bindings for Jest
License: MIT License
$ dotnet new fable-jest -n sdk-tests -lang F#
$ cd sdk-tests
$ dotnet restore
The request was aborted: Could not create SSL/TLS secure channel. (Github - cached (temporarily ignore updates))
C:\proj\Page\source\tests\.paket\Paket.Restore.targets(102,5): error MSB3073: The command ""C:\proj\Page\source\tests\.paket\paket.exe" restore --project "C:\proj\Page\source\tests\test\fable-jest-template-test.fsproj"" exited with code 1. [C:\proj\Page\source\tests\test\fable-jest-template-test.fsproj]
Seems like this is unmaintained, what are people using these days?
I'm getting some problems when compiling with Fable2.
I try
module FableProject.Tests
open Fable.Import.Jest
open Matchers
open FableProject.Library
test "Basic sum test" <| fun () ->
sum 7 4 == 11
And I get
C:/temp/fable-template/Content/.fable/Fable.Import.Jest.1.9.0/Matchers.fs(75,69): (75,107) error FSHARP: This runtime coercion or type test from type
'a
to
string
involves an indeterminate type based on information prior to this program point. Runtime type tests are not allowed on some types. Further type annotations are needed.
C:/temp/fable-template/Content/.fable/Fable.Import.Jest.1.9.0/Matchers.fs(75,132): (75,170) error FSHARP: This runtime coercion or type test from type
'a
to
string
involves an indeterminate type based on information prior to this program point. Runtime type tests are not allowed on some types. Further type annotations are needed.
C:/temp/fable-template/Content/.fable/Fable.Import.Jest.1.9.0/Matchers.fs(76,70): (76,108) error FSHARP: This runtime coercion or type test from type
'a
to
string
involves an indeterminate type based on information prior to this program point. Runtime type tests are not allowed on some types. Further type annotations are needed.
C:/temp/fable-template/Content/.fable/Fable.Import.Jest.1.9.0/Matchers.fs(76,128): (76,166) error FSHARP: This runtime coercion or type test from type
'a
to
string
involves an indeterminate type based on information prior to this program point. Runtime type tests are not allowed on some types. Further type annotations are needed.
C:/temp/fable-template/Content/.fable/Fable.Import.Jest.1.9.0/Matchers.fs(87,2): (87,42) error FSHARP: This runtime coercion or type test from type
'a
to
unit
involves an indeterminate type based on information prior to this program point. Runtime type tests are not allowed on some types. Further type annotations are needed.
C:/temp/fable-template/Content/.fable/Fable.Import.Jest.1.9.0/Matchers.fs(90,2): (90,41) error FSHARP: This runtime coercion or type test from type
'a
to
unit
involves an indeterminate type based on information prior to this program point. Runtime type tests are not allowed on some types. Further type annotations are needed.
fable: Compilation failed at 13:43:25 (11.890 s)
error Command failed with exit code 1.
Not entirely sure what is going wrong here, I hope it is related to Fable two. Maybe the bindings should be revisited.
Problem seems to be related to :?> string
.
See R75
Error doesn't occur when sprintf
is changed to:
| true -> createObj ["message" ==> (sprintf "Expected %A not to equal %A" (this?utils?printExpected(x)) (this?utils?printReceived(y))); "pass" ==> true]
Same with :?> unit
on R90
Is resolved by
let toEqualNone (x):unit =
expect.Invoke(x)?toEqualNone() |> ignore
I didn't find one but I guess it would be nice if there is a dotnet cli template for this.
Bindings for mockImplementation
and friends should be added
dotnet new fable-jest -n my-test-app
doesn't seem to work for me, just get command usage info
Dotnet v2.1.4
Windows 10
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.