1.4.0 • Published 6 years ago

jest-fable-preprocessor v1.4.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

jest-fable-preprocessor

Build Status Greenkeeper badge

Compiles Fable to JS on the fly for Jest testing.

Setup

At a minimum, your package.json should include these entries (version numbers not important):

{
  "scripts": {
    "test": "jest"
  },
  "jest": {
    "preset": "jest-fable-preprocessor"
  },
  "devDependencies": {
    "babel-core": "6.26.0",
    "jest": "22.1.4",
    "jest-fable-preprocessor": "1.3.3"
  }
}

You will also need a Test.fsproj file under a test directory. The Test.fsproj file should contain your tests and a link to the source. Example:

<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <ProjectReference Include="../Shell.fsproj" />
    <Compile Include="unit/ShellTest.fs" />
    <Compile Include="integration/ShellTest.fs" />
  </ItemGroup>
  <Import Project="../paket/Paket.Restore.targets" />
</Project>

Running

dotnet fable npm-test will parse your tests and run them.

1.4.0

6 years ago

1.3.3

7 years ago

1.3.2

7 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.6

7 years ago

1.2.5

7 years ago

1.2.4

7 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago