New to the world of modern JS (like TS, TDD, Node...), so please bear with me :) My app involves fetching data from the back-end and processing it using Three.js. Despite trying various methods from the documentation, including chai-as-promised, nothing seems to be displaying in the browser or console after successful compilation. I've even dabbled in async syntax, but realized that's more for Node... Any pointers on where I might be going wrong? The code appears valid, and I'm running it in the latest version of Firefox.
Thanks for any help in advance.
it('A test what should fetch from the local api a json file', function(done) {
// The url is just a random service I'm using for temporal test purpose
fetch('https://baconipsum.com/api/?type=meat-and-filler')
.then(function(response) {
return response.json();
})
.then(function(data) {
if (data) {
done();
} else {
done('err');
}
});
});