-
Notifications
You must be signed in to change notification settings - Fork 196
Expand file tree
/
Copy pathNode20Test.php
More file actions
43 lines (39 loc) · 1.54 KB
/
Node20Test.php
File metadata and controls
43 lines (39 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
namespace Tests;
class Node20Test extends Base
{
protected string $sdkName = 'node.js';
protected string $sdkPlatform = 'server';
protected string $sdkLanguage = 'nodejs';
protected string $version = '0.0.1';
protected string $language = 'node';
protected string $class = 'Appwrite\SDK\Language\Node';
protected array $build = [
'cp tests/languages/node/test.js tests/sdks/node/test.js',
'docker run --rm -v $(pwd):/app -w /app/tests/sdks/node node:20-alpine npm install',
'docker run --rm -v $(pwd):/app -w /app/tests/sdks/node node:20-alpine npm run build'
];
protected string $command =
'docker run --network="mockapi" --rm -v $(pwd):/app -w /app node:20-alpine node tests/sdks/node/test.js';
protected array $expectedOutput = [
...Base::PING_RESPONSE,
...Base::FOO_RESPONSES,
...Base::FOO_RESPONSES, // Object params
...Base::BAR_RESPONSES,
...Base::BAR_RESPONSES, // Object params
...Base::GENERAL_RESPONSES,
...Base::UPLOAD_RESPONSES,
...Base::LARGE_FILE_RESPONSES,
...Base::LARGE_FILE_RESPONSES,
...Base::LARGE_FILE_RESPONSES,
...Base::LARGE_FILE_RESPONSES, // Large file uploads
...Base::ENUM_RESPONSES,
...Base::MODEL_RESPONSES,
...Base::EXCEPTION_RESPONSES,
...Base::OAUTH_RESPONSES,
...Base::QUERY_HELPER_RESPONSES,
...Base::PERMISSION_HELPER_RESPONSES,
...Base::ID_HELPER_RESPONSES,
...Base::OPERATOR_HELPER_RESPONSES
];
}