Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example tests throw errors #67

Closed
dmitrizzle opened this issue Jun 28, 2018 · 0 comments
Closed

Example tests throw errors #67

dmitrizzle opened this issue Jun 28, 2018 · 0 comments
Labels
bug Something isn't working

Comments

@dmitrizzle
Copy link
Contributor

Error.

Running example tests seems to have some issue with jest when it throws this error:

Summary of all failing tests
 FAIL  examples/index.test.js
  ● Test suite failed to run

    /Users/dmitri/Documents/roast-cms/french-press-editor/node_modules/typeface-rajdhani/index.css:2
    @font-face {
    ^

    SyntaxError: Invalid or unexpected token

       6 | import { render } from "react-dom";
       7 | import React from "react";
    >  8 | 
         | ^
       9 | import { EXAMPLE_THEME } from "./constants";
      10 | import {
      11 |   //

      at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:403:17)
      at Object.<anonymous> (examples/index.js:8:1)
      at Object.<anonymous> (examples/index.test.js:9:9)


Test Suites: 1 failed, 20 passed, 21 total
Tests:       20 passed, 20 total
Snapshots:   0 total
Time:        5.048s
Ran all test suites.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Attempts at fix.

jestjs/jest#3094 (comment)

Result.

I've implemented steps in the above solution (installing proxy and mocking files), however the error still persists. I have also tried installing https://github.com/styled-components/jest-styled-components and importing it in the test file, however, that didn't help either.
Mock files and proxies are in #66

@dmitrizzle dmitrizzle mentioned this issue Jun 28, 2018
@dmitrizzle dmitrizzle self-assigned this Jun 28, 2018
@dmitrizzle dmitrizzle added the bug Something isn't working label Jun 28, 2018
@dmitrizzle dmitrizzle removed their assignment Jun 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant