mirror of
https://github.com/vale981/Vulcan
synced 2025-03-05 09:31:43 -05:00
Fix ESLint unused variables
This commit is contained in:
parent
111e00ecae
commit
3e1571e1e8
4 changed files with 11 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
|||
import 'jsdom-global/register';
|
||||
import React from 'react';
|
||||
import expect from 'expect';
|
||||
import { mount, shallow } from 'enzyme';
|
||||
import { shallow } from 'enzyme';
|
||||
import { Components } from 'meteor/vulcan:core';
|
||||
import { initComponentTest } from 'meteor/vulcan:test';
|
||||
import { withComponents } from '../lib/modules';
|
||||
|
|
|
@ -30,7 +30,9 @@ describe('vulcan:core/default_resolvers', function() {
|
|||
});
|
||||
// TODO: what's the name of this argument? handles cache
|
||||
const lastArg = { cacheControl: {} };
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const loggedInUser = { _id: 'foobar', groups: [], isAdmin: false };
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const adminUser = { _id: 'foobar', groups: [], isAdmin: true };
|
||||
const getSingleResolver = () => getDefaultResolvers(resolversOptions).single.resolver;
|
||||
|
||||
|
@ -71,6 +73,7 @@ describe('vulcan:core/default_resolvers', function() {
|
|||
it('throws if documentId is defined but does not match any document', function() {
|
||||
const resolver = getSingleResolver();
|
||||
const documentId = 'bad-document';
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const document = { _id: documentId };
|
||||
const input = { selector: { documentId } };
|
||||
// empty db
|
||||
|
|
|
@ -98,6 +98,8 @@ const arrayFullCustomSchema = {
|
|||
};
|
||||
// example with a native type
|
||||
// ["20 rue du Moulin PARIS", "16 rue de la poste PARIS"]
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const arrayOfStringSchema = {
|
||||
addresses: {
|
||||
type: Array,
|
||||
|
@ -116,6 +118,7 @@ const objectSchema = {
|
|||
}
|
||||
};
|
||||
// without calling SimpleSchema
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const bareObjectSchema = {
|
||||
addresses: {
|
||||
type: addressSchema,
|
||||
|
@ -139,6 +142,7 @@ const Objects = createDummyCollection('Object', objectSchema);
|
|||
const ArrayOfUrls = createDummyCollection('ArrayOfUrl', arrayOfUrlSchema);
|
||||
const ArrayOfCustomObjects = createDummyCollection('ArrayOfCustomObject', arrayOfCustomObjectSchema);
|
||||
const ArrayFullCustom = createDummyCollection('ArrayFullCustom', arrayFullCustomSchema);
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const ArrayOfStrings = createDummyCollection('ArrayOfString', arrayOfStringSchema);
|
||||
|
||||
const Addresses = createCollection({
|
||||
|
@ -290,7 +294,9 @@ describe('vulcan-forms/components', function() {
|
|||
.find('input')
|
||||
.first()
|
||||
.simulate('change', { target:{value:'bar'} });
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(wrapper.find('input').first().html());
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(wrapper.state());
|
||||
expect(wrapper.state().currentValues).toEqual({foo:'bar'});
|
||||
});
|
||||
|
|
|
@ -14,6 +14,7 @@ describe('vulcan:lib/components', function () {
|
|||
const MyComponents = { TestComponent: OverrideTestComponent };
|
||||
const MergedComponents = mergeWithComponents(MyComponents);
|
||||
expect(MergedComponents.TestComponent).toEqual(OverrideTestComponent);
|
||||
// eslint-disable-next-line
|
||||
expect(MergedComponents.TestComponent()).toEqual('bar');
|
||||
});
|
||||
it('return \'Components\' if no components are provided', function () {
|
||||
|
|
Loading…
Add table
Reference in a new issue