My Favorite Unit Test
in Software Last modified at:
I use this one to find out if the test environment is set up correctly.
I use this one to find out if the test environment is set up correctly:
describe('the universe', () => {
it('should exist', () => {
expect(true).toBe(true);
});
});
It’s also a software engineers version of Descartes’ “Cogito ergo sum”: The test passed, therefore the universe must exist.