Your IP : 216.73.216.86


Current Path : /var/www/homesaver/www/bitrix/js/location/core/test/repository/
Upload File :
Current File : /var/www/homesaver/www/bitrix/js/location/core/test/repository/actiontestrunner.js

import ActionRunner from '../../src/repository/actionrunner';

class ActionTestRunner extends ActionRunner
{
	#response;

	constructor()
	{
		super({path: 'testPath'});
	}

	set response(response)
	{
		this.#response = response;
	}

	run(action, data)
	{
		if(!action)
		{
			throw new Error('action must not be empty!');
		}

		return new Promise(
			() => this.#response,
			(data) => BX.debug(data)
		);
	}
}

export default ActionTestRunner;