SuperSimpleDev / javascript-course

737 stars 588 forks source link

I am not sure where the issue is but the jasmine test system is not recognizing the source file to test. #125

Closed sakib078 closed 4 months ago

sakib078 commented 4 months ago

here I am attaching the info. to debug the issue: want to test the priceformatter function the code organization is quite similar to the tutorial , the code is also same from the tutorial however the monerTest.js file is in the spec folder which i have given the path to recognize it as a script , code moneyTest.js : import { priceFormatter } from "../../scripts/utils/money";

console.log("test suit: formatcurrancy");

describe('test suit: fromate currancy', () => { it('convert cents into dollars', () => { expect(priceFormatter(2095)).toEqual(20.95); }); });,

test.js : <!DOCTYPE html>

Jasmine Spec Runner v5.1.1 . error; Incomplete: No specs found, , randomized with seed [48042](http://127.0.0.1:5500/jasmine-testing/test.html?hideDisabled=false&stopOnSpecFailure=false&seed=48042)
sakib078 commented 4 months ago

image , found the issue not properly rendering the priceFormatter file from it's actual location .

Issue solved here : import { priceFormatter } from "../../scripts/utils/money.js";