blob: 8c6b13e00ff81bf993950d7a962cdf523124a5b4 [file] [log] [blame]
henrique2a7dccc2014-03-07 22:16:51 +01001/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19 /* jshint -W100 */
Kazuki Matsudab909a382016-02-13 19:36:09 +090020
henrique2a7dccc2014-03-07 22:16:51 +010021/*
Kazuki Matsudab909a382016-02-13 19:36:09 +090022 * Fully Async JavaScript test suite for ThriftTest.thrift.
henrique2a7dccc2014-03-07 22:16:51 +010023 * These tests are designed to exercise the WebSocket transport
24 * (which is exclusively async).
25 *
26 * To compile client code for this test use:
27 * $ thrift -gen js ThriftTest.thrift
28 */
29
30
31
32// all Languages in UTF-8
Brian Forbisb5d6ea32018-08-25 23:39:29 -040033const stringTest = "Afrikaans, Alemannisch, Aragonés, العربية, مصرى, Asturianu, Aymar aru, Azərbaycan, Башҡорт, Boarisch, Žemaitėška, Беларуская, Беларуская (тарашкевіца), Български, Bamanankan, বাংলা, Brezhoneg, Bosanski, Català, Mìng-dĕ̤ng-ngṳ̄, Нохчийн, Cebuano, ᏣᎳᎩ, Česky, Словѣ́ньскъ / ⰔⰎⰑⰂⰡⰐⰠⰔⰍⰟ, Чӑвашла, Cymraeg, Dansk, Zazaki, ދިވެހިބަސް, Ελληνικά, Emiliàn e rumagnòl, English, Esperanto, Español, Eesti, Euskara, فارسی, Suomi, Võro, Føroyskt, Français, Arpetan, Furlan, Frysk, Gaeilge, 贛語, Gàidhlig, Galego, Avañe'ẽ, ગુજરાતી, Gaelg, עברית, हिन्दी, Fiji Hindi, Hrvatski, Kreyòl ayisyen, Magyar, Հայերեն, Interlingua, Bahasa Indonesia, Ilokano, Ido, Íslenska, Italiano, 日本語, Lojban, Basa Jawa, ქართული, Kongo, Kalaallisut, ಕನ್ನಡ, 한국어, Къарачай-Малкъар, Ripoarisch, Kurdî, Коми, Kernewek, Кыргызча, Latina, Ladino, Lëtzebuergesch, Limburgs, Lingála, ລາວ, Lietuvių, Latviešu, Basa Banyumasan, Malagasy, Македонски, മലയാളം, मराठी, Bahasa Melayu, مازِرونی, Nnapulitano, Nedersaksisch, नेपाल भाषा, Nederlands, ‪Norsk (nynorsk)‬, ‪Norsk (bokmål)‬, Nouormand, Diné bizaad, Occitan, Иронау, Papiamentu, Deitsch, Norfuk / Pitkern, Polski, پنجابی, پښتو, Português, Runa Simi, Rumantsch, Romani, Română, Русский, Саха тыла, Sardu, Sicilianu, Scots, Sámegiella, Simple English, Slovenčina, Slovenščina, Српски / Srpski, Seeltersk, Svenska, Kiswahili, தமிழ், తెలుగు, Тоҷикӣ, ไทย, Türkmençe, Tagalog, Türkçe, Татарча/Tatarça, Українська, اردو, Tiếng Việt, Volapük, Walon, Winaray, 吴语, isiXhosa, ייִדיש, Yorùbá, Zeêuws, 中文, Bân-lâm-gú, 粵語";
Kazuki Matsudab909a382016-02-13 19:36:09 +090034
Brian Forbisb5d6ea32018-08-25 23:39:29 -040035function checkRecursively(assert, map1, map2) {
henrique2a7dccc2014-03-07 22:16:51 +010036 if (typeof map1 !== 'function' && typeof map2 !== 'function') {
37 if (!map1 || typeof map1 !== 'object') {
Brian Forbisb5d6ea32018-08-25 23:39:29 -040038 assert.equal(map1, map2);
henrique2a7dccc2014-03-07 22:16:51 +010039 } else {
Brian Forbisb5d6ea32018-08-25 23:39:29 -040040 for (let key in map1) {
41 checkRecursively(assert, map1[key], map2[key]);
henrique2a7dccc2014-03-07 22:16:51 +010042 }
43 }
44 }
45}
46
Brian Forbisb5d6ea32018-08-25 23:39:29 -040047QUnit.module('Base Types');
henrique2a7dccc2014-03-07 22:16:51 +010048
Brian Forbisb5d6ea32018-08-25 23:39:29 -040049 QUnit.test('Void', function(assert) {
50 assert.expect(1);
51 const done = assert.async();
henrique2a7dccc2014-03-07 22:16:51 +010052 client.testVoid(function(result) {
Brian Forbisb5d6ea32018-08-25 23:39:29 -040053 assert.equal(result, undefined);
54 done();
henrique2a7dccc2014-03-07 22:16:51 +010055 });
56 });
Kazuki Matsudab909a382016-02-13 19:36:09 +090057
58
Brian Forbisb5d6ea32018-08-25 23:39:29 -040059 QUnit.test('String', function(assert) {
60 assert.expect(3);
61 const done = assert.async(3);
Kazuki Matsudab909a382016-02-13 19:36:09 +090062 client.testString('', function(result) {
Brian Forbisb5d6ea32018-08-25 23:39:29 -040063 assert.equal(result, '');
64 done();
henrique2a7dccc2014-03-07 22:16:51 +010065 });
Kazuki Matsudab909a382016-02-13 19:36:09 +090066 client.testString(stringTest, function(result) {
Brian Forbisb5d6ea32018-08-25 23:39:29 -040067 assert.equal(result, stringTest);
68 done();
henrique2a7dccc2014-03-07 22:16:51 +010069 });
70
Brian Forbisb5d6ea32018-08-25 23:39:29 -040071 const specialCharacters = 'quote: \" backslash:' +
henrique2a7dccc2014-03-07 22:16:51 +010072 ' forwardslash-escaped: \/ ' +
73 ' backspace: \b formfeed: \f newline: \n return: \r tab: ' +
74 ' now-all-of-them-together: "\\\/\b\n\r\t' +
75 ' now-a-bunch-of-junk: !@#$%&()(&%$#{}{}<><><';
Kazuki Matsudab909a382016-02-13 19:36:09 +090076 client.testString(specialCharacters, function(result) {
Brian Forbisb5d6ea32018-08-25 23:39:29 -040077 assert.equal(result, specialCharacters);
78 done();
henrique2a7dccc2014-03-07 22:16:51 +010079 });
80 });
Brian Forbisb5d6ea32018-08-25 23:39:29 -040081 QUnit.test('Double', function(assert) {
82 assert.expect(4);
83 const done = assert.async(4);
Kazuki Matsudab909a382016-02-13 19:36:09 +090084 client.testDouble(0, function(result) {
Brian Forbisb5d6ea32018-08-25 23:39:29 -040085 assert.equal(result, 0);
86 done();
henrique2a7dccc2014-03-07 22:16:51 +010087 });
Kazuki Matsudab909a382016-02-13 19:36:09 +090088 client.testDouble(-1, function(result) {
Brian Forbisb5d6ea32018-08-25 23:39:29 -040089 assert.equal(result, -1);
90 done();
henrique2a7dccc2014-03-07 22:16:51 +010091 });
Kazuki Matsudab909a382016-02-13 19:36:09 +090092 client.testDouble(3.14, function(result) {
Brian Forbisb5d6ea32018-08-25 23:39:29 -040093 assert.equal(result, 3.14);
94 done();
henrique2a7dccc2014-03-07 22:16:51 +010095 });
Kazuki Matsudab909a382016-02-13 19:36:09 +090096 client.testDouble(Math.pow(2, 60), function(result) {
Brian Forbisb5d6ea32018-08-25 23:39:29 -040097 assert.equal(result, Math.pow(2, 60));
98 done();
henrique2a7dccc2014-03-07 22:16:51 +010099 });
100 });
Kazuki Matsudab909a382016-02-13 19:36:09 +0900101 // TODO: add testBinary()
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400102 QUnit.test('Byte', function(assert) {
103 assert.expect(2);
104 const done = assert.async(2);
henrique2a7dccc2014-03-07 22:16:51 +0100105 client.testByte(0, function(result) {
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400106 assert.equal(result, 0);
107 done();
henrique2a7dccc2014-03-07 22:16:51 +0100108 });
109 client.testByte(0x01, function(result) {
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400110 assert.equal(result, 0x01);
111 done();
henrique2a7dccc2014-03-07 22:16:51 +0100112 });
113 });
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400114 QUnit.test('I32', function(assert) {
115 assert.expect(3);
116 const done = assert.async(3);
Kazuki Matsudab909a382016-02-13 19:36:09 +0900117 client.testI32(0, function(result) {
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400118 assert.equal(result, 0);
119 done();
henrique2a7dccc2014-03-07 22:16:51 +0100120 });
Kazuki Matsudab909a382016-02-13 19:36:09 +0900121 client.testI32(Math.pow(2, 30), function(result) {
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400122 assert.equal(result, Math.pow(2, 30));
123 done();
henrique2a7dccc2014-03-07 22:16:51 +0100124 });
Kazuki Matsudab909a382016-02-13 19:36:09 +0900125 client.testI32(-Math.pow(2, 30), function(result) {
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400126 assert.equal(result, -Math.pow(2, 30));
127 done();
henrique2a7dccc2014-03-07 22:16:51 +0100128 });
129 });
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400130 QUnit.test('I64', function(assert) {
131 assert.expect(3);
132 const done = assert.async(3);
Kazuki Matsudab909a382016-02-13 19:36:09 +0900133 client.testI64(0, function(result) {
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400134 assert.equal(result, 0);
135 done();
henrique2a7dccc2014-03-07 22:16:51 +0100136 });
137 //This is usually 2^60 but JS cannot represent anything over 2^52 accurately
Kazuki Matsudab909a382016-02-13 19:36:09 +0900138 client.testI64(Math.pow(2, 52), function(result) {
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400139 assert.equal(result, Math.pow(2, 52));
140 done();
henrique2a7dccc2014-03-07 22:16:51 +0100141 });
Kazuki Matsudab909a382016-02-13 19:36:09 +0900142 client.testI64(-Math.pow(2, 52), function(result) {
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400143 assert.equal(result, -Math.pow(2, 52));
144 done();
henrique2a7dccc2014-03-07 22:16:51 +0100145 });
146 });
henrique2a7dccc2014-03-07 22:16:51 +0100147
henrique2a7dccc2014-03-07 22:16:51 +0100148
henrique2a7dccc2014-03-07 22:16:51 +0100149
Kazuki Matsudab909a382016-02-13 19:36:09 +0900150
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400151QUnit.module('Structured Types');
Kazuki Matsudab909a382016-02-13 19:36:09 +0900152
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400153 QUnit.test('Struct', function(assert) {
154 assert.expect(5);
155 const done = assert.async();
156 const structTestInput = new ThriftTest.Xtruct();
henrique2a7dccc2014-03-07 22:16:51 +0100157 structTestInput.string_thing = 'worked';
158 structTestInput.byte_thing = 0x01;
Kazuki Matsudab909a382016-02-13 19:36:09 +0900159 structTestInput.i32_thing = Math.pow(2, 30);
henrique2a7dccc2014-03-07 22:16:51 +0100160 //This is usually 2^60 but JS cannot represent anything over 2^52 accurately
Kazuki Matsudab909a382016-02-13 19:36:09 +0900161 structTestInput.i64_thing = Math.pow(2, 52);
henrique2a7dccc2014-03-07 22:16:51 +0100162
Kazuki Matsudab909a382016-02-13 19:36:09 +0900163 client.testStruct(structTestInput, function(result) {
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400164 assert.equal(result.string_thing, structTestInput.string_thing);
165 assert.equal(result.byte_thing, structTestInput.byte_thing);
166 assert.equal(result.i32_thing, structTestInput.i32_thing);
167 assert.equal(result.i64_thing, structTestInput.i64_thing);
168 assert.equal(JSON.stringify(result), JSON.stringify(structTestInput));
169 done();
henrique2a7dccc2014-03-07 22:16:51 +0100170 });
171 });
172
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400173 QUnit.test('Nest', function(assert) {
174 assert.expect(7);
175 const done = assert.async();
176 const xtrTestInput = new ThriftTest.Xtruct();
henrique2a7dccc2014-03-07 22:16:51 +0100177 xtrTestInput.string_thing = 'worked';
178 xtrTestInput.byte_thing = 0x01;
Kazuki Matsudab909a382016-02-13 19:36:09 +0900179 xtrTestInput.i32_thing = Math.pow(2, 30);
henrique2a7dccc2014-03-07 22:16:51 +0100180 //This is usually 2^60 but JS cannot represent anything over 2^52 accurately
Kazuki Matsudab909a382016-02-13 19:36:09 +0900181 xtrTestInput.i64_thing = Math.pow(2, 52);
182
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400183 const nestTestInput = new ThriftTest.Xtruct2();
henrique2a7dccc2014-03-07 22:16:51 +0100184 nestTestInput.byte_thing = 0x02;
185 nestTestInput.struct_thing = xtrTestInput;
Kazuki Matsudab909a382016-02-13 19:36:09 +0900186 nestTestInput.i32_thing = Math.pow(2, 15);
187
188 client.testNest(nestTestInput, function(result) {
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400189 assert.equal(result.byte_thing, nestTestInput.byte_thing);
190 assert.equal(result.struct_thing.string_thing, nestTestInput.struct_thing.string_thing);
191 assert.equal(result.struct_thing.byte_thing, nestTestInput.struct_thing.byte_thing);
192 assert.equal(result.struct_thing.i32_thing, nestTestInput.struct_thing.i32_thing);
193 assert.equal(result.struct_thing.i64_thing, nestTestInput.struct_thing.i64_thing);
194 assert.equal(result.i32_thing, nestTestInput.i32_thing);
195 assert.equal(JSON.stringify(result), JSON.stringify(nestTestInput));
196 done();
henrique2a7dccc2014-03-07 22:16:51 +0100197 });
198 });
199
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400200 QUnit.test('Map', function(assert) {
201 assert.expect(3);
202 const done = assert.async();
203 const mapTestInput = {7: 77, 8: 88, 9: 99};
henrique2a7dccc2014-03-07 22:16:51 +0100204
Kazuki Matsudab909a382016-02-13 19:36:09 +0900205 client.testMap(mapTestInput, function(result) {
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400206 for (let key in result) {
207 assert.equal(result[key], mapTestInput[key]);
henrique2a7dccc2014-03-07 22:16:51 +0100208 }
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400209 done();
henrique2a7dccc2014-03-07 22:16:51 +0100210 });
211 });
212
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400213 QUnit.test('StringMap', function(assert) {
214 assert.expect(6);
215 const done = assert.async();
216 const mapTestInput = {
Kazuki Matsudab909a382016-02-13 19:36:09 +0900217 'a': '123', 'a b': 'with spaces ', 'same': 'same', '0': 'numeric key',
218 'longValue': stringTest, stringTest: 'long key'
219 };
220
221 client.testStringMap(mapTestInput, function(result) {
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400222 for (let key in result) {
223 assert.equal(result[key], mapTestInput[key]);
Kazuki Matsudab909a382016-02-13 19:36:09 +0900224 }
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400225 done();
Kazuki Matsudab909a382016-02-13 19:36:09 +0900226 });
227 });
228
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400229 QUnit.test('Set', function(assert) {
230 assert.expect(1);
231 const done = assert.async();
232 const setTestInput = [1, 2, 3];
Kazuki Matsudab909a382016-02-13 19:36:09 +0900233 client.testSet(setTestInput, function(result) {
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400234 assert.ok(result, setTestInput);
235 done();
henrique2a7dccc2014-03-07 22:16:51 +0100236 });
237 });
238
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400239 QUnit.test('List', function(assert) {
240 assert.expect(1);
241 const done = assert.async();
242 const listTestInput = [1, 2, 3];
Kazuki Matsudab909a382016-02-13 19:36:09 +0900243 client.testList(listTestInput, function(result) {
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400244 assert.ok(result, listTestInput);
245 done();
henrique2a7dccc2014-03-07 22:16:51 +0100246 });
247 });
248
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400249 QUnit.test('Enum', function(assert) {
250 assert.expect(1);
251 const done = assert.async();
Kazuki Matsudab909a382016-02-13 19:36:09 +0900252 client.testEnum(ThriftTest.Numberz.ONE, function(result) {
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400253 assert.equal(result, ThriftTest.Numberz.ONE);
254 done();
henrique2a7dccc2014-03-07 22:16:51 +0100255 });
256 });
257
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400258 QUnit.test('TypeDef', function(assert) {
259 assert.expect(1);
260 const done = assert.async();
Kazuki Matsudab909a382016-02-13 19:36:09 +0900261 client.testTypedef(69, function(result) {
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400262 assert.equal(result, 69);
263 done();
henrique2a7dccc2014-03-07 22:16:51 +0100264 });
265 });
266
267
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400268QUnit.module('deeper!');
henrique2a7dccc2014-03-07 22:16:51 +0100269
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400270 QUnit.test('MapMap', function(assert) {
271 assert.expect(16);
272 const done = assert.async();
273 const mapMapTestExpectedResult = {
Kazuki Matsudab909a382016-02-13 19:36:09 +0900274 '4': {'1': 1, '2': 2, '3': 3, '4': 4},
275 '-4': {'-4': -4, '-3': -3, '-2': -2, '-1': -1}
henrique2a7dccc2014-03-07 22:16:51 +0100276 };
277
Kazuki Matsudab909a382016-02-13 19:36:09 +0900278 client.testMapMap(1, function(result) {
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400279 for (let key in result) {
280 for (let key2 in result[key]) {
281 assert.equal(result[key][key2], mapMapTestExpectedResult[key][key2]);
henrique2a7dccc2014-03-07 22:16:51 +0100282 }
283 }
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400284 checkRecursively(assert, result, mapMapTestExpectedResult);
285 done();
henrique2a7dccc2014-03-07 22:16:51 +0100286 });
287 });
288
289
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400290QUnit.module('Exception');
henrique2a7dccc2014-03-07 22:16:51 +0100291
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400292 QUnit.test('Xception', function(assert) {
293 assert.expect(2);
294 const done = assert.async();
Kazuki Matsudab909a382016-02-13 19:36:09 +0900295 client.testException('Xception', function(e) {
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400296 assert.equal(e.errorCode, 1001);
297 assert.equal(e.message, 'Xception');
298 done();
henrique2a7dccc2014-03-07 22:16:51 +0100299 });
300 });
301
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400302 QUnit.test('no Exception', function(assert) {
303 assert.expect(1);
304 const done = assert.async();
Kazuki Matsudab909a382016-02-13 19:36:09 +0900305 client.testException('no Exception', function(e) {
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400306 assert.ok(!e);
307 done();
henrique2a7dccc2014-03-07 22:16:51 +0100308 });
309 });
310
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400311QUnit.module('Insanity');
henrique2a7dccc2014-03-07 22:16:51 +0100312
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400313 QUnit.test('testInsanity', function(assert) {
314 assert.expect(24);
315 const done = assert.async();
316 const insanity = {
Kazuki Matsudab909a382016-02-13 19:36:09 +0900317 '1': {
318 '2': {
319 'userMap': { '5': 5, '8': 8 },
320 'xtructs': [{
321 'string_thing': 'Goodbye4',
322 'byte_thing': 4,
323 'i32_thing': 4,
324 'i64_thing': 4
henrique2a7dccc2014-03-07 22:16:51 +0100325 },
326 {
Kazuki Matsudab909a382016-02-13 19:36:09 +0900327 'string_thing': 'Hello2',
328 'byte_thing': 2,
329 'i32_thing': 2,
330 'i64_thing': 2
henrique2a7dccc2014-03-07 22:16:51 +0100331 }
332 ]
333 },
Kazuki Matsudab909a382016-02-13 19:36:09 +0900334 '3': {
335 'userMap': { '5': 5, '8': 8 },
336 'xtructs': [{
337 'string_thing': 'Goodbye4',
338 'byte_thing': 4,
339 'i32_thing': 4,
340 'i64_thing': 4
henrique2a7dccc2014-03-07 22:16:51 +0100341 },
342 {
Kazuki Matsudab909a382016-02-13 19:36:09 +0900343 'string_thing': 'Hello2',
344 'byte_thing': 2,
345 'i32_thing': 2,
346 'i64_thing': 2
henrique2a7dccc2014-03-07 22:16:51 +0100347 }
348 ]
349 }
350 },
Kazuki Matsudab909a382016-02-13 19:36:09 +0900351 '2': { '6': { 'userMap': null, 'xtructs': null } }
henrique2a7dccc2014-03-07 22:16:51 +0100352 };
Kazuki Matsudab909a382016-02-13 19:36:09 +0900353 client.testInsanity(new ThriftTest.Insanity(), function(res) {
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400354 assert.ok(res, JSON.stringify(res));
355 assert.ok(insanity, JSON.stringify(insanity));
356 checkRecursively(assert, res, insanity);
357 done();
henrique2a7dccc2014-03-07 22:16:51 +0100358 });
359 });
360
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400361QUnit.module('Oneway');
henrique2a7dccc2014-03-07 22:16:51 +0100362
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400363 QUnit.test('testOneway', function(assert) {
364 assert.expect(1);
365 const done = assert.async();
Philip Frank8fdd6102017-12-06 12:38:05 +0100366 client.testOneway(1, function(result) {
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400367 assert.equal(result, undefined);
368 done();
Philip Frank8fdd6102017-12-06 12:38:05 +0100369 });
Brian Forbisb5d6ea32018-08-25 23:39:29 -0400370 });