Skip to content

Commit 30cfe49

Browse files
committed
tests: title and description test
1 parent d2f9432 commit 30cfe49

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

tests/methods/create.test.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,24 @@ test('check that create method returns expected response', async () => {
1212
expect(res.files[0].language.name).toBe('Text');
1313
});
1414

15+
test('check that create method can have title and description', async () => {
16+
const res = await create(
17+
[
18+
{
19+
content: 'test',
20+
language: 'text',
21+
},
22+
],
23+
{
24+
title: 'Test',
25+
description: 'A test desc',
26+
},
27+
);
28+
29+
expect(res.title).toBe('Test');
30+
expect(res.description).toBe('A test desc');
31+
});
32+
1533
test('check that language defaults to text', async () => {
1634
const res = await create([
1735
{

0 commit comments

Comments
 (0)