Skip to content

Commit

Permalink
Merge 8c2b99e into 5851647
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Dec 30, 2019
2 parents 5851647 + 8c2b99e commit 72a1e23
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -23,7 +23,7 @@ addons:
sauce_connect: true

script:
- COVERAGE=true npm run test
- COVERAGE=true FLAKEY=false npm run test
- ./node_modules/coveralls/bin/coveralls.js < ./coverage/lcov.info;

after_success: sizereport --config
24 changes: 13 additions & 11 deletions debug/test/browser/devtools/renderer.test.js
Expand Up @@ -7,7 +7,6 @@ import {
createContext
} from 'preact';
import { memo, forwardRef, Suspense } from 'preact/compat';
import * as sinon from 'sinon';
import {
createRenderer,
getFilteredChildren
Expand All @@ -28,6 +27,9 @@ import {
SUSPENSE
} from '../../../src/devtools/10/constants';

/* global DISABLE_FLAKEY */
const flakeyIt = DISABLE_FLAKEY ? xit : it;

/** @jsx createElement */

/**
Expand Down Expand Up @@ -116,7 +118,7 @@ describe('Renderer 10', () => {
]);
});

it('should unmount nodes', () => {
flakeyIt('should unmount nodes', () => {
render(
<div>
<span>foo</span>
Expand Down Expand Up @@ -151,7 +153,7 @@ describe('Renderer 10', () => {
]);
});

it('should mount after filtered update', () => {
flakeyIt('should mount after filtered update', () => {
renderer.applyFilters({
regex: [],
type: new Set(['dom'])
Expand Down Expand Up @@ -479,7 +481,7 @@ describe('Renderer 10', () => {
).to.equal(-1);
});

it('should find filtered nodes', () => {
flakeyIt('should find filtered nodes', () => {
renderer.applyFilters({
regex: [],
type: new Set(['dom'])
Expand Down Expand Up @@ -605,7 +607,7 @@ describe('Renderer 10', () => {
]);
});

it('should filter by dom type #1', () => {
flakeyIt('should filter by dom type #1', () => {
renderer.applyFilters({
regex: [],
type: new Set(['dom'])
Expand All @@ -623,7 +625,7 @@ describe('Renderer 10', () => {
]);
});

it('should filter by dom type #2', () => {
flakeyIt('should filter by dom type #2', () => {
renderer.applyFilters({
regex: [],
type: new Set(['dom'])
Expand All @@ -647,7 +649,7 @@ describe('Renderer 10', () => {
]);
});

it('should filter by fragment type', () => {
flakeyIt('should filter by fragment type', () => {
renderer.applyFilters({
regex: [],
type: new Set(['fragment'])
Expand All @@ -672,7 +674,7 @@ describe('Renderer 10', () => {
]);
});

it('should filter on update', () => {
flakeyIt('should filter on update', () => {
renderer.applyFilters({
regex: [],
type: new Set(['dom'])
Expand Down Expand Up @@ -713,7 +715,7 @@ describe('Renderer 10', () => {
]);
});

it('should update filters after 1st render', () => {
flakeyIt('should update filters after 1st render', () => {
renderer.applyFilters({
regex: [],
type: new Set(['dom'])
Expand Down Expand Up @@ -757,7 +759,7 @@ describe('Renderer 10', () => {
]);
});

it('should update filters after 1st render with unmounts', () => {
flakeyIt('should update filters after 1st render with unmounts', () => {
renderer.applyFilters({
regex: [],
type: new Set(['dom'])
Expand Down Expand Up @@ -830,7 +832,7 @@ describe('Renderer 10', () => {
});

describe('getFilteredChildren', () => {
it('should get direct children', () => {
flakeyIt('should get direct children', () => {
const Foo = () => <div>foo</div>;
const Bar = () => <div>bar</div>;

Expand Down
2 changes: 2 additions & 0 deletions karma.conf.js
Expand Up @@ -88,6 +88,8 @@ const babelOptions = (options = {}) => {
};
};

sauceLabs = true;

module.exports = function(config) {
config.set({
browsers: sauceLabs
Expand Down
4 changes: 4 additions & 0 deletions test/polyfills.js
Expand Up @@ -7,6 +7,10 @@ import 'core-js/fn/array/find';
import 'core-js/fn/array/includes';
import 'core-js/fn/string/includes';
import 'core-js/fn/object/assign';
import 'core-js/fn/string/starts-with';
import 'core-js/fn/string/code-point-at';
import 'core-js/fn/string/from-code-point';
import 'core-js/fn/string/repeat';

// Fix Function#name on browsers that do not support it (IE).
// Taken from: https://stackoverflow.com/a/17056530/755391
Expand Down

0 comments on commit 72a1e23

Please sign in to comment.