mirror of
https://github.com/hasura/graphql-engine.git
synced 2025-01-07 08:13:18 +03:00
24 lines
599 B
JavaScript
24 lines
599 B
JavaScript
|
const { getActionsCodegen } = require('../../build/services/actions-codegen/codegen');
|
||
|
const { samplePayload } = require('./payload');
|
||
|
|
||
|
const test = async () => {
|
||
|
|
||
|
try {
|
||
|
const codegenFiles = await getActionsCodegen(samplePayload);
|
||
|
if (codegenFiles) {
|
||
|
console.log('✓ Actions codegen test passed');
|
||
|
} else {
|
||
|
console.log('✘ Actions codegen test failed');
|
||
|
console.log('Received empty codegen');
|
||
|
process.exit(1);
|
||
|
}
|
||
|
} catch (e) {
|
||
|
console.log('✘ Actions codegen test failed');
|
||
|
console.error(e);
|
||
|
process.exit(1);
|
||
|
}
|
||
|
|
||
|
};
|
||
|
|
||
|
module.exports = test;
|