tianji/src/client/utils/survey.spec.ts

26 lines
586 B
TypeScript
Raw Normal View History

2024-05-15 12:32:25 +00:00
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();
});
});