mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Remove/replace uses of "sanity" in comments and test code (#134541)
This commit is contained in:
parent
188d5a07bb
commit
35fab1c4a5
16 changed files with 19 additions and 19 deletions
|
@ -167,7 +167,7 @@ shadowSize and lineWidth are derived as well from the points series.
|
|||
radius = s.points.radius,
|
||||
err = [s.points.xerr, s.points.yerr];
|
||||
|
||||
//sanity check, in case some inverted axis hack is applied to flot
|
||||
//ensure no inverted axis hack is applied to flot
|
||||
var invertX = false;
|
||||
if (ax[0].p2c(ax[0].max) < ax[0].p2c(ax[0].min)) {
|
||||
invertX = true;
|
||||
|
@ -226,7 +226,7 @@ shadowSize and lineWidth are derived as well from the points series.
|
|||
lower = minmax[0];
|
||||
}
|
||||
|
||||
//sanity check, in case some inverted axis hack is applied to flot
|
||||
//ensure no inverted axis hacks are applied to flot
|
||||
if ((err[e].err == 'x' && invertX) || (err[e].err == 'y' && invertY)) {
|
||||
//swap coordinates
|
||||
var tmp = lower;
|
||||
|
|
|
@ -78,7 +78,7 @@ function clickGroup(component: ReactWrapper, group: string) {
|
|||
}
|
||||
|
||||
describe('CollapsibleNav', () => {
|
||||
// this test is mostly an "EUI works as expected" sanity check
|
||||
// this test is mostly an "EUI works as expected" check
|
||||
it('renders the default nav', () => {
|
||||
const component = mount(<CollapsibleNav {...mockProps()} />);
|
||||
expect(component).toMatchSnapshot();
|
||||
|
|
|
@ -670,7 +670,7 @@ function wrapWithTry(
|
|||
try {
|
||||
const result = migrationFn(doc, context);
|
||||
|
||||
// A basic sanity check to help migration authors detect basic errors
|
||||
// A basic check to help migration authors detect basic errors
|
||||
// (e.g. forgetting to return the transformed doc)
|
||||
if (!result || !result.type) {
|
||||
throw new Error(`Invalid saved object returned from migration ${type.name}:${version}.`);
|
||||
|
|
|
@ -231,7 +231,7 @@ export class PersistedState extends EventEmitter {
|
|||
// If `mergeMethod` returns `undefined` the default merging method is used
|
||||
this._mergedState = mergeWith(targetObj, sourceObj, mergeMethod);
|
||||
|
||||
// sanity check; verify that there are actually changes
|
||||
// verify that there are actually changes
|
||||
if (isEqual(this._mergedState, this._defaultState)) this._changedState = {};
|
||||
|
||||
if (!silent && stateChanged) this.emit('change', key);
|
||||
|
|
|
@ -14,7 +14,7 @@ export async function getIndexNotFoundError(es) {
|
|||
index: 'SHOULD NOT EXIST',
|
||||
});
|
||||
} catch (err) {
|
||||
expect(err).to.have.property('statusCode', 404); // sanity check
|
||||
expect(err).to.have.property('statusCode', 404); // basic check
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ export async function getDocNotFoundError(es) {
|
|||
id: '1234',
|
||||
});
|
||||
} catch (err) {
|
||||
expect(err).to.have.property('statusCode', 404); // sanity check
|
||||
expect(err).to.have.property('statusCode', 404); // basic check
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ export const useImportWorkpad = () => {
|
|||
|
||||
workpad.id = getId('workpad');
|
||||
|
||||
// sanity check for workpad object
|
||||
// check for workpad object
|
||||
if (isInvalidWorkpad(workpad)) {
|
||||
onComplete();
|
||||
throw new Error(errors.getMissingPropertiesErrorMessage());
|
||||
|
|
|
@ -26,7 +26,7 @@ import { ExceptionListClient } from './exception_list_client';
|
|||
import { DataValidationError } from './utils/errors';
|
||||
|
||||
describe('exception_list_client', () => {
|
||||
describe('Mock client sanity checks', () => {
|
||||
describe('Mock client checks', () => {
|
||||
test('it returns the exception list as expected', async () => {
|
||||
const mock = getExceptionListClientMock();
|
||||
const list = await mock.getExceptionList({
|
||||
|
|
|
@ -11,7 +11,7 @@ import { LIST_INDEX, LIST_ITEM_INDEX } from '../../../common/constants.mock';
|
|||
import { getListClientMock } from './list_client.mock';
|
||||
|
||||
describe('list_client', () => {
|
||||
describe('Mock client sanity checks (not exhaustive tests against it)', () => {
|
||||
describe('Mock client checks (not exhaustive tests against it)', () => {
|
||||
test('it returns the get list index as expected', () => {
|
||||
const mock = getListClientMock();
|
||||
expect(mock.getListIndex()).toEqual(LIST_INDEX);
|
||||
|
|
|
@ -125,7 +125,7 @@ describe('ExplorerChartsContainer', () => {
|
|||
);
|
||||
|
||||
// We test child components with snapshots separately
|
||||
// so we just do some high level sanity check here.
|
||||
// so we just do a high level check here.
|
||||
expect(wrapper.find('.ml-explorer-chart-container').children()).toHaveLength(2);
|
||||
|
||||
// Check if the additional y-axis information for rare charts is not part of the chart
|
||||
|
@ -152,7 +152,7 @@ describe('ExplorerChartsContainer', () => {
|
|||
);
|
||||
|
||||
// We test child components with snapshots separately
|
||||
// so we just do some high level sanity check here.
|
||||
// so we just do a high level check here.
|
||||
expect(wrapper.find('.ml-explorer-chart-container').children()).toHaveLength(2);
|
||||
|
||||
// Check if the additional y-axis information for rare charts is part of the chart
|
||||
|
|
|
@ -10,7 +10,7 @@ import { getInternalArtifactMock } from '../../schemas/artifacts/saved_objects.m
|
|||
import { ManifestEntry } from './manifest_entry';
|
||||
|
||||
describe('manifest_entry', () => {
|
||||
describe('ManifestEntry object sanity checks', () => {
|
||||
describe('ManifestEntry object checks', () => {
|
||||
let artifact: InternalArtifactSchema;
|
||||
let manifestEntry: ManifestEntry;
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ describe('task', () => {
|
|||
taskType: ManifestTaskConstants.TYPE,
|
||||
};
|
||||
|
||||
describe('Periodic task sanity checks', () => {
|
||||
describe('Periodic task checks', () => {
|
||||
test('can create task', () => {
|
||||
const manifestTask = new ManifestTask({
|
||||
endpointAppContext: createMockEndpointAppContext(),
|
||||
|
|
|
@ -10,7 +10,7 @@ import { EndpointArtifactClient } from './artifact_client';
|
|||
import { createArtifactsClientMock } from '@kbn/fleet-plugin/server/mocks';
|
||||
|
||||
describe('artifact_client', () => {
|
||||
describe('ArtifactClient sanity checks', () => {
|
||||
describe('ArtifactClient checks', () => {
|
||||
let fleetArtifactClient: ReturnType<typeof createArtifactsClientMock>;
|
||||
let artifactClient: EndpointArtifactClient;
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import { getManifestClientMock } from './mocks';
|
|||
import { ManifestClient } from './manifest_client';
|
||||
|
||||
describe('manifest_client', () => {
|
||||
describe('ManifestClient sanity checks', () => {
|
||||
describe('ManifestClient checks', () => {
|
||||
test('can create ManifestClient', () => {
|
||||
const manifestClient = new ManifestClient(savedObjectsClientMock.create(), 'v1');
|
||||
expect(manifestClient).toBeInstanceOf(ManifestClient);
|
||||
|
|
|
@ -72,7 +72,7 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
.expect(404);
|
||||
});
|
||||
|
||||
it('validates param length for sanity', async () => {
|
||||
it('validates param length', async () => {
|
||||
const veryLargeMonId = new Array(1050).fill('1').join('');
|
||||
|
||||
await supertest
|
||||
|
|
|
@ -113,7 +113,7 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
expect(getResponse.body.message).eql(expected404Message);
|
||||
});
|
||||
|
||||
it('validates param length for sanity', async () => {
|
||||
it('validates param length', async () => {
|
||||
const veryLargeMonId = new Array(1050).fill('1').join('');
|
||||
|
||||
await supertest
|
||||
|
|
|
@ -239,7 +239,7 @@ export default ({ getService }: FtrProviderContext) => {
|
|||
})
|
||||
.expect(200);
|
||||
|
||||
// sanity check
|
||||
// basic check
|
||||
await supertest
|
||||
.get(`${LIST_ITEM_URL}/_find?list_id=${LIST_ID}`)
|
||||
.set('kbn-xsrf', 'true')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue