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

Enzyme Internal Error: configured enzyme adapter did not inherit from the EnzymeAdapter base class #2003

Closed
JonathanYates opened this issue Feb 19, 2019 · 18 comments

Comments

@JonathanYates
Copy link

JonathanYates commented Feb 19, 2019

Issue description or question

I am getting the following error when trying to run Wallaby in VSCode:

Runtime error: Error: Enzyme Internal Error: configured enzyme adapter did not inherit from the EnzymeAdapter base class 
[Error] at validateAdapter (I:\dev\xap-prod-svc-web\xap-prod-svc-web-web\node_modules\enzyme\build\validateAdapter.js:25:11) 
[Error] at Object.merge [as configure] (I:\dev\xap-prod-svc-web\xap-prod-svc-web-web\node_modules\enzyme\build\configuration.js:28:38) 
[Error] at Object.configure (E:\cv_UserTemp\software\VSCode-win32-x64-1.30.2\data\extensions\wallabyjs.wallaby-vscode-1.0.113\projects\8c5d0afc2633a088\instrumented\src\test\test-setup.js:9:30) 

I am configuring the EnzymeAdapter in src/test/test-setup.js as follows:

import Enzyme from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';

Enzyme.configure({ adapter: new Adapter() });

And I am specifying the setup File in package.json in the jest config as follows:

"setupTestFrameworkScriptFile": "/src/test/test-setup.js",

I don't get any errors when I run Jest using yarn test, which just runs jest.

I have the following as the relevent devDependencies:

"@babel/core": "7.0.0-beta.46",
"@babel/plugin-proposal-class-properties": "7.0.0-beta.42",
"@babel/plugin-proposal-object-rest-spread": "7.0.0-beta.46",
"@babel/preset-env": "7.0.0-beta.46",
"@babel/preset-react": "7.0.0-beta.46",
"@babel/preset-typescript": "7.0.0-beta.42",
"@babel/register": "7.0.0-beta.46",
"@types/enzyme": "^3.1.15",
"@types/enzyme-adapter-react-16": "^1.0.2",
"@types/jest": "^23.3.9",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "^23.6.0",
"babel-loader": "8.0.0-beta.2",
"enzyme": "^3.8.0",
"enzyme-adapter-react-16": "^1.8.0",
"jest": "^23.6.0"

This is my package.json jest config:

"jest": {
"verbose": true,
"moduleDirectories": [
"node_modules",
"src"
],
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"gql",
"graphql"
],
"setupTestFrameworkScriptFile": "/src/test/test-setup.js",
"transform": {
"\.(gql|graphql)$": "/src/test/jest-transform-graphql",
"^.+\.js$": "babel-jest",
"^.+\.tsx?$": "babel-jest"
},
"testMatch": [
"/src/**/*spec.(ts|tsx|js)"
],
"testPathIgnorePatterns": [
"/node_modules/"
],
"transformIgnorePatterns": [
"/node_modules/(?!seamless-immutable|react).+\.js$"
],
"moduleNameMapper": {
"\.(css|less|sass|scss)$": "/src/test/mocks/styleMock.js",
"\.(gif|ttf|eot|svg)$": "/src/test/mocks/fileMock.js"
}
}

Wallaby.js configuration file

module.exports = function(wallaby) {
  return {
    files: [
      'src/**/*.js',
      'src/**/*.jsx',
      'src/**/*.ts',
      'src/**/*.tsx',
      '!src/**/*spec.js',
      '!src/**/*spec.jsx',
      '!src/**/*spec.ts',
      '!src/**/*spec.tsx'
    ],
    tests: ['src/**/*spec.js', 'src/**/*spec.jsx', 'src/**/*spec.ts', 'src/**/*spec.tsx'],
    env: {
      type: 'node',
      runner: 'node'
    },
    compilers: {
      '**/*.js': wallaby.compilers.babel({
        presets: ['@babel/react', '@babel/preset-env', '@babel/preset-typescript'],
        plugins: ['react-hot-loader/babel', '@babel/proposal-class-properties', '@babel/proposal-object-rest-spread']
      }),
      '**/*.tsx?': wallaby.compilers.typeScript({ })
    },
    testFramework: 'jest'
  };
};

Code editor or IDE name and version

Visual Studio Code v1.30.2

OS name and version

Windows 7

@ArtemGovorov
Copy link
Member

Try this change:

-"setupTestFrameworkScriptFile": "/src/test/test-setup.js",
+"setupTestFrameworkScriptFile": "<rootDir>/src/test/test-setup.js",

and if it doesn't help, please create a sample repo demonstrating the issue, we are happy to take a look.

@JonathanYates
Copy link
Author

JonathanYates commented Feb 20, 2019

It is already prefixed with <rootDir>. For some reason this got removed when I pasted it in to the comment.

I also get these errors before the EnzymeAdapter Errors. I don't why it thinks test-setup.js is a test. I am specifying only spec files as tests.

[Error] Some long running code has been detected: one of your files is taking more than 5000ms to execute. 
[Error] Execution of the following files has started but has not finished: 
[Error] - src/test/test-setup.js 
[Error] Try commenting out the test or excluding the test file from the tests list in your wallaby config, 
[Error] and restarting wallaby to make sure that it is this test/file causing the issue and not something else. 
[Error] Pinging test runner sandbox... 
[Error] Some long running code has been detected: one of your files is taking more than 5000ms to execute. 
[Error] Execution of the following files has started but has not finished: 
[Error] - src/test/test-setup.js 
[Error] Try commenting out the test or excluding the test file from the tests list in your wallaby config, 
[Error] and restarting wallaby to make sure that it is this test/file causing the issue and not something else. 
[Error] Pinging test runner sandbox... 
[Error] Some long running code has been detected: one of your files is taking more than 5000ms to execute. 
[Error] Execution of the following files has started but has not finished: 
[Error] - src/test/test-setup.js 
[Error] Try commenting out the test or excluding the test file from the tests list in your wallaby config, 
[Error] and restarting wallaby to make sure that it is this test/file causing the issue and not something else. 
[Error] Pinging test runner sandbox... 
[Error] Some long running code has been detected: one of your files is taking more than 5000ms to execute. 
[Error] Execution of the following files has started but has not finished: 
[Error] - src/test/test-setup.js 
[Error] Try commenting out the test or excluding the test file from the tests list in your wallaby config, 
[Error] and restarting wallaby to make sure that it is this test/file causing the issue and not something else. 
[Error] Pinging test runner sandbox... 
[Error] Some long running code has been detected: one of your files is taking more than 5000ms to execute. 
[Error] Execution of the following files has started but has not finished: 
[Error] - src/test/test-setup.js 
[Error] Try commenting out the test or excluding the test file from the tests list in your wallaby config, 
[Error] and restarting wallaby to make sure that it is this test/file causing the issue and not something else. 
[Error] Pinging test runner sandbox... 
[Error] Some long running code has been detected: one of your files is taking more than 5000ms to execute. 
[Error] Execution of the following files has started but has not finished: 
[Error] - src/test/test-setup.js 
[Error] Try commenting out the test or excluding the test file from the tests list in your wallaby config, 
[Error] and restarting wallaby to make sure that it is this test/file causing the issue and not something else. 
[Error] Pinging test runner sandbox... 
[Error] The sandbox is not responsive. Check for possibly recently introduced infinite loops. 
[Error] The sandbox is not responsive. Check for possibly recently introduced infinite loops. 
[Error] The sandbox is not responsive. Check for possibly recently introduced infinite loops. 
[Error] The sandbox is not responsive. Check for possibly recently introduced infinite loops. 
[Error] The sandbox is not responsive. Check for possibly recently introduced infinite loops. 
[Error] The sandbox is not responsive. Check for possibly recently introduced infinite loops. 
[Error] Runtime error: Error: Enzyme Internal Error: configured enzyme adapter did not inherit from the EnzymeAdapter base class 
[Error] at validateAdapter (I:\dev\xap-prod-svc-web\xap-prod-svc-web-web\node_modules\enzyme\build\validateAdapter.js:25:11) 
[Error] at Object.merge [as configure] (I:\dev\xap-prod-svc-web\xap-prod-svc-web-web\node_modules\enzyme\build\configuration.js:28:38) 
[Error] at Object.configure (E:\cv_UserTemp\software\VSCode-win32-x64-1.30.2\data\extensions\wallabyjs.wallaby-vscode-1.0.113\projects\8c5d0afc2633a088\instrumented\src\test\test-setup.js:9:30) 
[Error] at Runtime._execModule (I:\dev\xap-prod-svc-web\xap-prod-svc-web-web\node_modules\jest-runtime\build\index.js:694:13) 
[Error] at Runtime.requireModule (I:\dev\xap-prod-svc-web\xap-prod-svc-web-web\node_modules\jest-runtime\build\index.js:376:14) 
[Error] at I:\dev\xap-prod-svc-web\xap-prod-svc-web-web\node_modules\jest-jasmine2\build\index.js:112:15 
[Error] at Generator.next () 
[Error] at step (I:\dev\xap-prod-svc-web\xap-prod-svc-web-web\node_modules\jest-jasmine2\build\index.js:170:30) 
[Error] at I:\dev\xap-prod-svc-web\xap-prod-svc-web-web\node_modules\jest-jasmine2\build\index.js:189:14 
[Error] at new Promise () 
[Error] at I:\dev\xap-prod-svc-web\xap-prod-svc-web-web\node_modules\jest-jasmine2\build\index.js:167:12 
[Error] at jasmine2 (I:\dev\xap-prod-svc-web\xap-prod-svc-web-web\node_modules\jest-jasmine2\build\index.js:138:17) 
[Error] at I:\dev\xap-prod-svc-web\xap-prod-svc-web-web\node_modules\jest-runner\build\run_test.js:187:24 
[Error] at Generator.next () 
[Error] at step (I:\dev\xap-prod-svc-web\xap-prod-svc-web-web\node_modules\jest-runner\build\run_test.js:315:30) 
[Error] at I:\dev\xap-prod-svc-web\xap-prod-svc-web-web\node_modules\jest-runner\build\run_test.js:326:15 
[Error] at  
[Error] at process._tickCallback (internal/process/next_tick.js:188:7) 
[Error] Runtime error: Error: Enzyme Internal Error: configured enzyme adapter did not inherit from the EnzymeAdapter base class 
[Error] at validateAdapter (I:\dev\xap-prod-svc-web\xap-prod-svc-web-web\node_modules\enzyme\build\validateAdapter.js:25:11) 
[Error] at Object.merge [as configure] (I:\dev\xap-prod-svc-web\xap-prod-svc-web-web\node_modules\enzyme\build\configuration.js:28:38) 
[Error] at Object.configure (E:\cv_UserTemp\software\VSCode-win32-x64-1.30.2\data\extensions\wallabyjs.wallaby-vscode-1.0.113\projects\8c5d0afc2633a088\instrumented\src\test\test-setup.js:9:30) 
[Error] at Runtime._execModule (I:\dev\xap-prod-svc-web\xap-prod-svc-web-web\node_modules\jest-runtime\build\index.js:694:13) 
[Error] at Runtime.requireModule (I:\dev\xap-prod-svc-web\xap-prod-svc-web-web\node_modules\jest-runtime\build\index.js:376:14) 
[Error] at I:\dev\xap-prod-svc-web\xap-prod-svc-web-web\node_modules\jest-jasmine2\build\index.js:112:15 
[Error] at Generator.next () 
[Error] at step (I:\dev\xap-prod-svc-web\xap-prod-svc-web-web\node_modules\jest-jasmine2\build\index.js:170:30) 
[Error] at I:\dev\xap-prod-svc-web\xap-prod-svc-web-web\node_modules\jest-jasmine2\build\index.js:189:14 
[Error] at new Promise () 
[Error] at I:\dev\xap-prod-svc-web\xap-prod-svc-web-web\node_modules\jest-jasmine2\build\index.js:167:12 
[Error] at jasmine2 (I:\dev\xap-prod-svc-web\xap-prod-svc-web-web\node_modules\jest-jasmine2\build\index.js:138:17) 
[Error] at I:\dev\xap-prod-svc-web\xap-prod-svc-web-web\node_modules\jest-runner\build\run_test.js:187:24 
[Error] at Generator.next () 
[Error] at step (I:\dev\xap-prod-svc-web\xap-prod-svc-web-web\node_modules\jest-runner\build\run_test.js:315:30) 
[Error] at I:\dev\xap-prod-svc-web\xap-prod-svc-web-web\node_modules\jest-runner\build\run_test.js:326:15 
[Error] at  
[Error] at process._tickCallback (internal/process/next_tick.js:188:7) 

@ArtemGovorov
Copy link
Member

Please create a sample repo demonstrating the issue, we are happy to take a look. It's likely that no real source/test files are required to reproduce it, just configs/setup.

@blogwebpl
Copy link

blogwebpl commented Feb 21, 2019

I have same error. I trying to create a sample demo demonstrating the issue. When I make new app with create-react-app + jest + enzyme + wallaby, everything works correctly. I copy my *.js and *.test.js to new folder and it works.

My project suddenly broken again. This is the repo demonstrating the issue:

https://github.com/blogwebpl/przewoznik.info-client

Error: Enzyme Internal Error: configured enzyme adapter did not inherit from the EnzymeAdapter base class 

@smcenlly
Copy link
Member

We downloaded the sample repo and everything seems to be working for us. The steps we took were:

  1. Clone repo
  2. Run npm install
  3. Open VS Code
  4. Start Wallaby

Result:

0 failing tests, 8 passing 

This is the same as what we see when running yarn test:

 PASS  src/components/TopBar/TopBar.test.js
 PASS  src/App.test.js

Test Suites: 2 passed, 2 total
Tests:       8 passed, 8 total
Snapshots:   0 total
Time:        2.959s
Ran all test suites.

Could you please try cloning the repo to a fresh directory to see if that fixes your problem?

@blogwebpl
Copy link

blogwebpl commented Feb 23, 2019

You're right.

Cloned repo result:
0 failing tests, 8 passing

But...

Original repo yesterday result:
Error: Enzyme Internal Error: configured enzyme adapter did not inherit from the EnzymeAdapter base class

Today after restart computer (macOS 10.14.3) everythinhg is fine.

Original repo result:
0 failing tests, 8 passing

Maybe something is cached ?

There is something else.

When I run Code Studio like this:

cd przewoznik.info/client
code .

0 failing tests, 8 passing

When I run like this:

cd przewoznik.info/server
code .

And then switch to client folder (using Projects+ plugin)
Error: Enzyme Internal Error: configured enzyme adapter did not inherit from the EnzymeAdapter base class

JonathanYates could you try run your editor from command line in project direcotry ?

@JonathanYates
Copy link
Author

JonathanYates commented Feb 25, 2019

Unfortunately I can't really create a repo as this is work project and everything is locked down here. I'd get into trouble if I did. But I can share with you my setup which I have tried on a simple project with bare minimum files and setup. This is all I have:

package.json

{
  "name": "wallaby-test",
  "version": "0.0.0",
  "description": "wallaby-test",
  "scripts": {
    "test": "jest",
    "test:watch": "npm run test -- --watch"
  },
  "dependencies": {
    "react": "^16.8.3",
    "react-dom": "^16.8.3"
  },
  "devDependencies": {
    "@babel/core": "^7.3.3",
    "@babel/plugin-proposal-class-properties": "^7.3.3",
    "@babel/plugin-proposal-object-rest-spread": "^7.3.2",
    "@babel/preset-env": "^7.3.1",
    "@babel/preset-react": "^7.0.0",
    "@babel/preset-typescript": "^7.3.3",
    "@babel/register": "^7.0.0",
    "@types/enzyme": "^3.9.0",
    "@types/enzyme-adapter-react-16": "^1.0.5",
    "@types/jest": "^24.0.6",
    "@types/react": "^16.8.4",
    "@types/react-dom": "^16.8.2",
    "babel-core": "^6.26.3",
    "babel-jest": "^24.1.0",
    "babel-loader": "^8.0.5",
    "enzyme": "^3.9.0",
    "enzyme-adapter-react-16": "^1.9.1",
    "jest": "^24.1.0",
    "react-hot-loader": "^4.7.1"
  },
  "jest": {
    "verbose": true,
    "moduleDirectories": [
      "node_modules",
      "src"
    ],
    "moduleFileExtensions": [
      "ts",
      "tsx",
      "js"
    ],
    "setupFilesAfterEnv": [
      "<rootDir>/src/test-setup.js"
    ],
    "transform": {
      "^.+\\.js$": "babel-jest",
      "^.+\\.tsx?$": "babel-jest"
    },
    "testMatch": [
      "<rootDir>/src/**/*spec.(ts|tsx|js)"
    ],
    "testPathIgnorePatterns": [
      "<rootDir>/node_modules/"
    ]
  }
}

wallaby.js

module.exports = function(wallaby) {
  return {
    files: [
      "src/**/*.js",
      "src/**/*.jsx",
      "!src/**/*.spec.js",
      "!src/**/*.spec.jsx"
    ],
    tests: ["src/**/*.spec.js", "src/**/*.spec.jsx"],
    env: {
      type: "node",
      runner: "node"
    },
    compilers: {
      "**/*.js": wallaby.compilers.babel({
        presets: ["@babel/react", "@babel/preset-env"],
        plugins: [
          "@babel/proposal-class-properties",
          "@babel/proposal-object-rest-spread"
        ]
      })
    },
    testFramework: "jest"
  };
};

then in src: test-setp.js

const Enzyme = require("enzyme");
const Adapter = require("enzyme-adapter-react-16");

Enzyme.configure({ adapter: new Adapter() });

and one test called foo.spec.js

describe('foo', () => {
  it('should be foo', () => {
    const foo = 'foo';
    expect(foo).toBe('foo');
  })
})

If I run npm test I get:

 PASS  src/foo.spec.js (6.215s)
  foo
    √ should be foo (4ms)

Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   0 total
Time:        8.302s
Ran all test suites.

But if I start Wallaby I get same error:

[Info]  Started Wallaby.js Core v1.0.658
[Error] Runtime error: Error: Enzyme Internal Error: configured enzyme adapter did not inherit from the EnzymeAdapter base class 
[Error]     at validateAdapter (I:\playground\wallaby-test\node_modules\enzyme\build\validateAdapter.js:25:11) 
[Error]     at Object.merge [as configure] (I:\playground\wallaby-test\node_modules\enzyme\build\configuration.js:28:38) 
[Error]     at Object.configure (.\src\test-setup.js:5:20) 
[Error]     at Runtime._execModule (I:\playground\wallaby-test\node_modules\jest\node_modules\jest-runtime\build\index.js:763:13) 
[Error]     at Runtime.requireModule (I:\playground\wallaby-test\node_modules\jest\node_modules\jest-runtime\build\index.js:358:14) 
[Error]     at config.setupFilesAfterEnv.forEach.path (I:\playground\wallaby-test\node_modules\jest\node_modules\jest-jasmine2\build\index.js:184:55) 
[Error]     at Array.forEach (<anonymous>) 
[Error]     at I:\playground\wallaby-test\node_modules\jest\node_modules\jest-jasmine2\build\index.js:184:31 
[Error]     at Generator.next (<anonymous>) 
[Error]     at asyncGeneratorStep (I:\playground\wallaby-test\node_modules\jest\node_modules\jest-jasmine2\build\index.js:27:24) 
[Error]     at _next (I:\playground\wallaby-test\node_modules\jest\node_modules\jest-jasmine2\build\index.js:47:9) 
[Error]     at I:\playground\wallaby-test\node_modules\jest\node_modules\jest-jasmine2\build\index.js:52:7 
[Error]     at new Promise (<anonymous>) 
[Error]     at I:\playground\wallaby-test\node_modules\jest\node_modules\jest-jasmine2\build\index.js:44:12 
[Error]     at _jasmine (I:\playground\wallaby-test\node_modules\jest\node_modules\jest-jasmine2\build\index.js:204:19) 
[Error]     at jasmine2 (I:\playground\wallaby-test\node_modules\jest\node_modules\jest-jasmine2\build\index.js:60:19) 
[Error]     at I:\playground\wallaby-test\node_modules\jest\node_modules\jest-runner\build\runTest.js:367:24 
[Error]     at Generator.next (<anonymous>) 
[Error]     at asyncGeneratorStep (I:\playground\wallaby-test\node_modules\jest\node_modules\jest-runner\build\runTest.js:151:24) 
[Error]     at _next (I:\playground\wallaby-test\node_modules\jest\node_modules\jest-runner\build\runTest.js:171:9) 
[Error]     at <anonymous> 
[Error]     at process._tickCallback (internal/process/next_tick.js:188:7) 
[Info]  console.log: FAIL src/foo.spec.js
[Info]  console.log:   ● Test suite failed to run
[Info]      Enzyme Internal Error: configured enzyme adapter did not inherit from the EnzymeAdapter base class
[Info]        at validateAdapter (I:/playground/wallaby-test/node_modules/enzyme/build/validateAdapter.js:25:11)
[Info]        at Object.merge [as configure] (I:/playground/wallaby-test/node_modules/enzyme/build/configuration.js:28:38)
[Info]        at Object.configure (I:/software/VSCode-win32-x64-1.30.2/data/extensions/wallabyjs.wallaby-vscode-1.0.114/projects/8977184d725326f8/instrumented/src/test-setup.js:5:20)
[Info]        at Runtime.u._wallabyReplaced.c.requireModule (I:/software/VSCode-win32-x64-1.30.2/data/extensions/wallabyjs.wallaby-vscode-1.0.114/wallaby/runners/node/[email protected]/initializer.js:14:24361)
[Info]            at Array.forEach (<anonymous>)

@smcenlly
Copy link
Member

We have followed your instructions and still can't duplicate the problem. I've created a sample repo with all of the content/artifacts that you provided (https://github.com/wallabyjs/issues-2003). Can you please try cloning and see if it's working for you?

If this is working for you and you are unable to provide us with a means to duplicate, the next thing for you to do is to diff the two projects to see what's different. You've probably already seen these links, but we did find that others had similar problems with Enzyme in the past with conflicting package versions:

enzymejs/enzyme#1437

https://stackoverflow.com/questions/48189151/enzyme-internal-error-configured-enzyme-adapter-did-not-inherit-from-the-enzyme

@JonathanYates
Copy link
Author

JonathanYates commented Feb 26, 2019

Thanks for creating the sample repo. I have cloned the repo, done npm install and then run jest and get this output.

PASS src/foo.spec.js (8.924s)
foo
√ should be foo (31ms)

Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: 12.058s
Ran all test suites.

But if I run Wallaby (v1.0.114) in VS Code (v1.31.1) I get this error, which is different from before:

[Info]  Started Wallaby.js Core v1.0.658
[Error] Runtime error: TypeError: Cannot read property '_jasmineAdapter' of undefined 
[Error] at Runtime._execModule (I:\playground\issues-2003-master\node_modules\jest-runtime\build\index.js:763:13) 
[Error] at Runtime.requireModule (I:\playground\issues-2003-master\node_modules\jest-runtime\build\index.js:358:14) 
[Error] at config.setupFilesAfterEnv.forEach.path (I:\playground\issues-2003-master\node_modules\jest-jasmine2\build\index.js:184:55) 
[Error] at Array.forEach () 
[Error] at I:\playground\issues-2003-master\node_modules\jest-jasmine2\build\index.js:184:31 
[Error] at Generator.next () 
[Error] at asyncGeneratorStep (I:\playground\issues-2003-master\node_modules\jest-jasmine2\build\index.js:27:24) 
[Error] at _next (I:\playground\issues-2003-master\node_modules\jest-jasmine2\build\index.js:47:9) 
[Error] at I:\playground\issues-2003-master\node_modules\jest-jasmine2\build\index.js:52:7 
[Error] at new Promise () 
[Error] at I:\playground\issues-2003-master\node_modules\jest-jasmine2\build\index.js:44:12 
[Error] at _jasmine (I:\playground\issues-2003-master\node_modules\jest-jasmine2\build\index.js:204:19) 
[Error] at jasmine2 (I:\playground\issues-2003-master\node_modules\jest-jasmine2\build\index.js:60:19) 
[Error] at I:\playground\issues-2003-master\node_modules\jest-runner\build\runTest.js:367:24 
[Error] at Generator.next () 
[Error] at asyncGeneratorStep (I:\playground\issues-2003-master\node_modules\jest-runner\build\runTest.js:151:24) 
[Error] at _next (I:\playground\issues-2003-master\node_modules\jest-runner\build\runTest.js:171:9) 
[Error] at  
[Error] at process._tickCallback (internal/process/next_tick.js:188:7) 
[Info]  console.log: FAIL src/foo.spec.js
[Info]  console.log: ● Test suite failed to run
[Info]  TypeError: Cannot read property '_jasmineAdapter' of undefined
[Info]  at Object._jasmineAdapter (I:/software/VSCode-win32-x64-1.31.1/data/extensions/wallabyjs.wallaby-vscode-1.0.114/wallaby/runners/node/[email protected]/jasmine2Initializer.js:14:2524)
[Info]  at Runtime.u._wallabyReplaced.c.requireModule (I:/software/VSCode-win32-x64-1.31.1/data/extensions/wallabyjs.wallaby-vscode-1.0.114/wallaby/runners/node/[email protected]/initializer.js:14:24361)
[Info]  at Array.forEach ()

@JonathanYates
Copy link
Author

Not sure if this is relevant but I am running VS Code in Portable Mode (https://code.visualstudio.com/docs/editor/portable) due to the corporate environment here which allows extensions to be installed to the data directory.

@ArtemGovorov
Copy link
Member

Please check if you have any of the following folders on disk:

I:/software/VSCode-win32-x64-1.31.1/data/extensions/node_modules
I:/software/VSCode-win32-x64-1.31.1/data/node_modules
I:/software/VSCode-win32-x64-1.31.1/node_modules
I:/software/node_modules
I:/node_modules

and if you do, try deleting them and restarting Wallaby.

If it doesn't help, please

  • try the same repo on a different computer to see if it's working (we have tried it on multiple machines - and it's working everywhere),
  • share your node and npm versions:
node -v
npm -v

@JonathanYates
Copy link
Author

Hi. None of those folders exist. I am running on a VM so difficult to test on another computer. This is running Windows 7.

Node version: v8.11.1
Npm version: 5.6.0

Could you please try running from VS Code Portable? Perhaps Wallaby Core isn't getting updated correctly or something?

https://code.visualstudio.com/docs/editor/portable

@ArtemGovorov
Copy link
Member

Could you please try running from VS Code Portable?

We'll try it (in a few hours on another Windows machine), but it is unlikely to be the issue - Wallaby Core looks up-to-date from your log file.

Could you please zip and attach the node_modules folder from your local https://github.com/wallabyjs/issues-2003 sample repo?

@JonathanYates
Copy link
Author

Unfortunately I can't do that here.

@ArtemGovorov
Copy link
Member

Could you please send an email with the requested archive to [email protected]?

@JonathanYates
Copy link
Author

Sorry we are not allowed to send external emails.

@ArtemGovorov
Copy link
Member

Dropbox/Google drive upload? Getting the folder seems to be the only way for us to be able reproduce the issue.

@smcenlly
Copy link
Member

Closing this issue as we require more detail to reproduce the issue. As per previous comment, please contact us outside of this public forum for more assistance if you can't share details publicly, we're happy to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants