How to configure a correct test environment for a fuse project.

I am trying to figure out how to create my own test environment to test the JavaScript classes I use in my fuse project.
I analyzed the environment offered by fuse but this environment does not seem to allow you to test asynchronous calls as Promise:

So I thought I’d configure the test environment Mocha, Chai and Chai-promised.
The difficulty I am having, however, is in being able to test methods that have dependencies with JavaScript methods offered by the fuse framework such as “Fetch”.
In fact, in the example that I leave the test fails because the method fetch is not available when I invoke the tests with Mocha.

I would like to have suggestions and examples of test environments that you have integrated into your fuse projects.

Thank you



        var Post= require('Post');
        var Observable = require("FuseJS/Observable");
        var title = Observable();


function get(id) {

    var status = 0;
    var response_ok = false;
    return fetch('' + id, {
        method: 'GET'
    }).then(function (response) {
        status = response.status;  // Get the HTTP status code
        response_ok = response.ok; // Is response.status in the 200-range?
        return response.json();    // This returns a promise
    }).then(function (responseObject) {
        return responseObject;
    }).catch(function (err) {

module.exports = {
    get: get

Test for Module Post.js

var chai = require("chai");
var chaiAsPromised = require("chai-as-promised");

var expect = chai.expect;
var should = chai.should()

var Post= require ('../Post');

describe("Test the behavior of Post", function () {
    it('The post should have the Title property', function () {


Output failed mocha -> Test.js


  Test the behavior of Post
call method
    1) The post should have the Title property

  0 passing (6ms)
  1 failing

  1) Test the behavior of Post
       The post should have the Title property:
     ReferenceError: fetch is not defined
      at Object.get (Post.js:6:5)
      at Context.<anonymous> (test/test.js:9:21)