Example #1
0
tap.test('QsParser.addData(emptyResult, key, value, notArrayFormat)', (test) => {

	const result = {};

	QSParser.addData(result, 'key', 'value', false);

	test.match(result, {
		key: 'value'
	});

	test.end();
});
Example #2
0
tap.test('QsParser.addData(emptyResult, key, value, arrayFormat)', (test) => {

	const result = {};

	QSParser.addData(result, 'key', 'value', true);

	test.match(result, {
		key: [
			'value'
		]
	});

	test.end();
});
Example #3
0
tap.test('QsParser.addData(resultWithThisKey, key, value, notArrayFormat)', (test) => {

	const result = {
		key: 'value'
	};

	QSParser.addData(result, 'key', 'value', false);

	test.match(result, {
		key: [
			'value',
			'value'
		]
	});

	test.end();
});