tianji/src/client/utils/survey.spec.ts
2024-05-15 20:32:25 +08:00

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();
});
});