polyfill flat() for jest on Node 10.x

This commit is contained in:
Michael Shanks 2020-08-27 10:10:35 +01:00
parent 82e99c3fd7
commit e5e81aa9c6
1 changed files with 7 additions and 0 deletions

View File

@ -1,4 +1,11 @@
import fetchBindableProperties from "../src/builderStore/fetchBindableProperties" import fetchBindableProperties from "../src/builderStore/fetchBindableProperties"
import { flat } from "lodash"
// supports running jest on Node 10.x
if (!Array.flat) {
Array.flat = flat
}
describe("fetch bindable properties", () => { describe("fetch bindable properties", () => {
it("should return bindable properties from screen components", () => { it("should return bindable properties from screen components", () => {