dimanche 6 décembre 2020

Run a mocha test?

Good evening, i am learning about testing and have installed mocha. I have a basic test that just compares 2 numbers and i cant get it to run. could anyone explain to me why and how to fix this?

Json

{  "scripts": {
  "test": "mocha test/**/*.js"
},
  "name": "image-gallery",
  "version": "1.0.0",
  "description": "",
  "main": "script-test.js",
  "directories": {
    "test": "script-test.js"
  },
 
  "author": "",
  "license": "ISC"
}

Test.js

const assert = require('assert');

describe('number test', function() {
    it('matching numbers', function() {
      assert.ok(2 === 2);
    });
  });

Aucun commentaire:

Enregistrer un commentaire