mirror of
https://github.com/wassname/talk.git
synced 2026-07-04 04:45:36 +08:00
86385e0d86
- Introduced the Jest testing framework into our server side code so plugins can now have tests that run
15 lines
450 B
JavaScript
15 lines
450 B
JavaScript
const resolvers = require('./resolvers');
|
|
|
|
describe('talk-plugin-akismet', () => {
|
|
describe('resolvers', () => {
|
|
it('resolves when there is a akismet value', () => {
|
|
const spam = resolvers.Comment.spam({ metadata: { akismet: true } });
|
|
expect(spam).toEqual(true);
|
|
});
|
|
it('resolves when there not is a akismet value', () => {
|
|
const spam = resolvers.Comment.spam({});
|
|
expect(spam).toEqual(null);
|
|
});
|
|
});
|
|
});
|