blob: 54197ea13d70bc5b647d05c60e67a6f42ba84f18 [file] [log] [blame]
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import '../../../test/common-test-setup';
import {PluginApi} from '../../../api/plugin';
import {ChecksPluginApi} from '../../../api/checks';
import {assert} from '@open-wc/testing';
import {testResolver} from '../../../test/common-test-setup';
import {pluginLoaderToken} from '../../shared/gr-js-api-interface/gr-plugin-loader';
suite('gr-settings-api tests', () => {
let checksApi: ChecksPluginApi | undefined;
setup(() => {
let pluginApi: PluginApi | undefined = undefined;
window.Gerrit.install(
p => {
pluginApi = p;
},
'0.1',
'http://test.com/plugins/testplugin/static/test.js'
);
testResolver(pluginLoaderToken).loadPlugins([]);
assert.isOk(pluginApi);
checksApi = pluginApi!.checks();
});
teardown(() => {
checksApi = undefined;
});
test('exists', () => {
assert.isOk(checksApi);
});
});