Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Monorepo] fix unit tests #18608

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,3 @@ jobs:
local_dir: playground/dist
on:
branch: master

dratwas marked this conversation as resolved.
Show resolved Hide resolved
allow_failures:
- name: JavaScript native mobile tests
60 changes: 0 additions & 60 deletions packages/react-native-editor/jest.config.js

This file was deleted.

9 changes: 0 additions & 9 deletions packages/react-native-editor/jest_gb.config.js

This file was deleted.

4 changes: 3 additions & 1 deletion test/native/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ module.exports = {
testEnvironment: 'jsdom',
testMatch: [
'**/test/*.native.[jt]s?(x)',
// This is temporary. In the future we should adjust test names to make it seamless for both the web and mobile.
'<rootDir>/packages/react-native-editor/src/**/__tests__/**/*.[jt]s?(x)',
dratwas marked this conversation as resolved.
Show resolved Hide resolved
'<rootDir>/packages/react-native-editor/src/**/?(*.)+(spec|test).[jt]s?(x)',
],
testPathIgnorePatterns: [
'/node_modules/',
'/wordpress/',
'/__device-tests__/',
],
testURL: 'http://localhost/',
// Add the `Libraries/Utilities` subfolder to the module directories, otherwise haste/jest doesn't find Platform.js on Travis
Expand Down
2 changes: 1 addition & 1 deletion test/native/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import { NativeModules } from 'react-native';

jest.mock( '@wordspress/react-native-bridge', () => {
dratwas marked this conversation as resolved.
Show resolved Hide resolved
jest.mock( '@wordpress/react-native-bridge', () => {
return {
addEventListener: jest.fn(),
removeEventListener: jest.fn(),
Expand Down