MCPcopy
hub / github.com/sequelize/sequelize / pad

Function pad

test/integration/model/create.test.js:957–957  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

955 const user0 = await userWithDefaults.findByPk(user.id);
956 const now = new Date();
957 const pad = number => number.toString().padStart(2, '0');
958
959 expect(user0.year).to.equal(`${now.getUTCFullYear()}-${pad(now.getUTCMonth() + 1)}-${pad(now.getUTCDate())}`);
960

Callers 1

create.test.jsFile · 0.85

Calls 1

toStringMethod · 0.65

Tested by

no test coverage detected