How can I test this helper using unit tests in Velocity/Jasmine? I don’t see a way to import just the Match part from Core. The Match functions just return undefined.
I could stub them but that seems rather silly in this case. Should I just run it in integration instead.
Schema.Comment = {
createdAt: Date,
userId: String,
message: Match.Where(function (msg) {
check(msg, String);
return msg.length <= 300;
})
};
describe("Post Schema", function() {
it("should have the correct types", function() {
Match.test("Example", Schema.Post.message)
expect(schema.message).toEqual(String);
});
});