26 lines
586 B
TypeScript
26 lines
586 B
TypeScript
|
import { describe, test, expect } from 'vitest';
|
||
|
import { generateSurveyExampleCode } from './survey';
|
||
|
|
||
|
describe('survey', () => {
|
||
|
test('example code', () => {
|
||
|
expect(
|
||
|
generateSurveyExampleCode('https://example.com', {
|
||
|
id: '<surveyId>',
|
||
|
workspaceId: '<workspaceId>',
|
||
|
name: 'Test',
|
||
|
payload: {
|
||
|
items: [
|
||
|
{
|
||
|
name: 'textField',
|
||
|
label: 'Text',
|
||
|
type: 'text',
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
createdAt: '',
|
||
|
updatedAt: '',
|
||
|
})
|
||
|
).matchSnapshot();
|
||
|
});
|
||
|
});
|