Add test 'constants'
CodeLenny opened this issue · comments
Tests may include some constant values in the file:
const test = require("ava");
const name = "bob";
test.beforeEach("create user", t => {
t.context.user = new User(name);
});
test("has name", t => {
const { user } = t.context;
t.is(user.getName(), name);
});
- Add to the "Test File Structure" list
- Add description to a section under "Test File Structure"
- See if it should be included in some of the test file examples in the README.