Files
talk/plugins/talk-plugin-akismet/server/config.js
T
Wyatt Johnson 86385e0d86 Jest for server
- Introduced the Jest testing framework into our server side code so
plugins can now have tests that run
2018-04-11 19:02:38 -06:00

13 lines
390 B
JavaScript

const config = {
KEY: process.env.TALK_AKISMET_API_KEY,
SITE: process.env.TALK_AKISMET_SITE,
};
if (process.env.NODE_ENV !== 'test' && (!config.KEY || !config.SITE)) {
throw new Error(
'Please set the TALK_AKISMET_API_KEY and TALK_AKISMET_SITE environment variable to use talk-plugin-akismet-comments. Visit https://akismet.com/ to get started.'
);
}
module.exports = config;