Skip to content
Permalink
Browse files

Upgrade dependencies and improve test reporting.

  • Loading branch information...
ghengeveld committed Aug 7, 2019
1 parent 253ba7c commit 1bd1f427408d315ed05a99d60ca58ff9b48473ae
@@ -1,6 +1,3 @@
/* eslint-disable no-console */
console.log("Loaded babel.config.js")

module.exports = {
presets: ["@babel/preset-react"],
plugins: ["@babel/plugin-proposal-object-rest-spread"],
@@ -1,5 +1,15 @@
/* eslint-disable no-console */
console.log("Loaded jest.config.js")
for (let pkg of [
"@testing-library/jest-dom",
"@testing-library/react",
"jest",
"react",
"react-dom",
]) {
console.log(
`Using \u001b[36;1m${pkg}@${require(`./node_modules/${pkg}/package.json`).version}\u001b[0m`
)
}

module.exports = {
rootDir: "./",
@@ -5,8 +5,6 @@
* @see https://github.com/facebook/react/pull/14853
*/

console.log("Loaded jest.setup.js")

const originalError = console.error

beforeAll(() => {
@@ -48,7 +48,8 @@
"@storybook/addon-links": "^5.1.9",
"@storybook/addons": "^5.1.9",
"@storybook/react": "^5.1.9",
"@testing-library/react": "^8.0.4",
"@testing-library/jest-dom": "^4.0.0",
"@testing-library/react": "^8.0.8",
"babel-eslint": "^10.0.2",
"babel-jest": "^24.8.0",
"babel-loader": "^8.0.6",
@@ -61,7 +62,6 @@
"eslint-plugin-react": "^7.14.2",
"eslint-plugin-react-hooks": "^1.6.1",
"jest": "^24.8.0",
"jest-dom": "^3.5.0",
"lerna": "^3.15.0",
"now": "^15.8.7",
"npm-run-all": "^4.1.5",
@@ -1,4 +1,4 @@
import "jest-dom/extend-expect"
import "@testing-library/jest-dom/extend-expect"
import React from "react"
import { useAsync } from "react-async"
import { render, cleanup, waitForElement, fireEvent } from "@testing-library/react"
@@ -1,6 +1,6 @@
/* eslint-disable react/prop-types */

import "jest-dom/extend-expect"
import "@testing-library/jest-dom/extend-expect"
import React from "react"
import { render, fireEvent, cleanup, waitForElement } from "@testing-library/react"
import Async, { createInstance, globalScope } from "./index"
@@ -1,5 +1,8 @@
/* istanbul ignore file */

/**
* Universal global scope object. In the browser this is `self`, in Node.js and React Native it's `global`.
* This file is excluded from coverage reporting because these globals are environment-specific so we can't test them all.
*/
const globalScope = (() => {
if (typeof self === "object" && self.self === self) return self
@@ -1,4 +1,4 @@
import "jest-dom/extend-expect"
import "@testing-library/jest-dom/extend-expect"
import React from "react"
import { render, fireEvent, cleanup, waitForElement } from "@testing-library/react"
import Async, { Initial, Pending, Fulfilled, Rejected, Settled } from "./index"
@@ -1,6 +1,6 @@
/* eslint-disable react/prop-types */

import "jest-dom/extend-expect"
import "@testing-library/jest-dom/extend-expect"
import React from "react"
import { render, fireEvent, waitForElement } from "@testing-library/react"

@@ -1,6 +1,6 @@
/* eslint-disable react/prop-types */

import "jest-dom/extend-expect"
import "@testing-library/jest-dom/extend-expect"

import { getInitialStatus, getIdleStatus, statusTypes } from "./status"

@@ -1,6 +1,6 @@
/* eslint-disable react/prop-types */

import "jest-dom/extend-expect"
import "@testing-library/jest-dom/extend-expect"
import React from "react"
import { render, fireEvent, cleanup, waitForElement } from "@testing-library/react"
import { useAsync, useFetch, globalScope } from "./index"
1,980 yarn.lock

Large diffs are not rendered by default.

0 comments on commit 1bd1f42

Please sign in to comment.
You can’t perform that action at this time.