Skip to content

Unit Tests don't work with A-Frame 1.2.0+ #5

Description

@diarmidmackenzie

This PR gets all examples working with A-Frame 1.3.0.

However if we upgrade the version of A-Frame used in devDependencies past 1.1.0, we get browserify build errors when we run npm run test

To reproduce:

In package.json, devDependencies update A-Frame dependency like this:

"aframe": "^1.2.0",

run npm install
run npm test run

We get a long series of errors, starting like this:

C:\Users\ASUS\Documents\GitHub\AframeCommunity\aframe-physics-system>npm run test

> aframe-physics-system@4.0.1 test
> karma start ./tests/karma.conf.js

Deprecated private createPreprocessor() API
02 10 2022 12:28:30.426:INFO [preprocessor.env]: Publishing variables:  [ 'TEST_ENV' ]
02 10 2022 12:28:30.447:INFO [framework.browserify]: registering rebuild (autoWatch=true)
02 10 2022 12:28:34.492:ERROR [framework.browserify]: bundle error
02 10 2022 12:28:34.492:ERROR [framework.browserify]: Error: Cannot find module './debug' from 'C:\Users\ASUS\Documents\GitHub\AframeCommunity\aframe-physics-system\node_modules\aframe\dist'
02 10 2022 12:28:34.494:ERROR [framework.browserify]: bundle error
02 10 2022 12:28:34.495:ERROR [framework.browserify]: Error: Cannot find module './GetIntrinsic' from 'C:\Users\ASUS\Documents\GitHub\AframeCommunity\aframe-physics-system\node_modules\aframe\dist'
02 10 2022 12:28:34.496:INFO [framework.browserify]: bundle updated
02 10 2022 12:28:34.496:ERROR [framework.browserify]: bundle error
02 10 2022 12:28:34.497:ERROR [framework.browserify]: Error: Cannot find module '../GetIntrinsic' from 'C:\Users\ASUS\Documents\GitHub\AframeCommunity\aframe-physics-system\node_modules\aframe\dist'
02 10 2022 12:28:34.498:INFO [framework.browserify]: bundle updated
02 10 2022 12:28:34.498:ERROR [framework.browserify]: bundle error
02 10 2022 12:28:34.499:ERROR [framework.browserify]: Error: Cannot find module './helpers/assertRecord' from 'C:\Users\ASUS\Documents\GitHub\AframeCommunity\aframe-physics-system\node_modules\aframe\dist'

Not yet undersood what change from A-Frame 1.1.0 to 1.2.0 causes this, or how to fix it.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions