Code Monkey home page Code Monkey logo

karma-fuse-box's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

robinbuschmann

karma-fuse-box's Issues

Uncaught Package not found glob

Hi,

Got a problem I can't seem to get around, hoping you can help. I'm new to Karma/Mocha/Fusebox etc so maybe it's something obvious I'm not getting.

I've set up my karma.config file according to the example, but when I start kama, I get an error in the Chrome dev tools:

error

I stepped through the code behind the error, but since it's minified I can't really tell exactly what's going on, but it appears to be looking for a package 'glob' in 'mocha' that doesn't exist for some reason.

My project is set up like so:

src/
tests/
--My_test.ts
karma.config.js
package.json
tsconfig.json

karma.config.js:

const path = require("path");
module.exports = config => {
    config.set({
        basePath: "",
        files: [
            { pattern: "tests/My_test.ts", watched: false }
        ],
        preprocessors: {
            "tests/My_test.ts": [ "fusebox" ]
        },
        fuseboxInstructions: "+ tests/My_test.ts",
        fusebox: {
            homeDir: path.join(process.cwd(), "tests/"),
            cache:false,
        },
        mime: {
            "text/x-typescript": ["ts", "tsx"]
        },
        browsers: ['Chrome'],
        logLevel: config.LOG_DEBUG,
        browserConsoleLogOptions: {
            level: "debug",
            terminal: true
        }
    });
};

My_test.ts:

import { assert } from "chai";
import { describe, it } from "mocha";
describe("This is my test", function(){
    it("should complete this test", function(){
        return assert.isTrue(true);
    });
});

In package.json:

"devDependencies": {
    "@types/bluebird": "^3.5.24",
    "@types/chai": "^4.1.4",
    "@types/chai-as-promised": "^7.1.0",
    "@types/karma": "^1.7.6",
    "@types/mocha": "^5.2.5",
    "@types/moment": "^2.13.0",
    "@types/sharepoint": "^2016.1.1",
    "@types/sinon": "^5.0.2",
    "@types/sinon-chai": "^3.2.0",
    "bluebird": "^3.5.2",
    "chai": "^4.1.2",
    "chai-as-promised": "^7.1.1",
    "fuse-box": "^3.5.0",
    "karma": "^3.0.0",
    "karma-browserify": "^5.3.0",
    "karma-chai": "^0.1.0",
    "karma-chai-as-promised": "^0.1.2",
    "karma-chrome-launcher": "^2.2.0",
    "karma-edge-launcher": "^0.4.2",
    "karma-firefox-launcher": "^1.1.0",
    "karma-fuse-box": "^1.1.0",
    "karma-ie-launcher": "^1.0.0",
    "karma-mocha": "^1.3.0",
    "karma-sinon": "^1.0.5",
    "karma-sinon-chai": "^2.0.2",
    "mocha": "^5.2.0",
    "moment": "^2.22.2",
    "node-watch": "^0.5.8",
    "opn": "^5.3.0",
    "sinon": "^6.2.0",
    "sinon-chai": "^3.2.0",
    "typedoc": "^0.12.0",
    "typedoc-plugin-external-module-name": "^1.1.3",
    "typescript": "^3.0.3",
    "uglify-js": "^3.4.9",
  },

Just to try and narrow down where the problem might be, I rewrote My_test.ts as a plain javascript file and used Browserify as the preprocessor instead of Fuse Box and the test ran without issue, so I'm guessing it's a FuseBox or Karma-Fuse-Box issue?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.