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] e2e tests #18576

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
12 changes: 6 additions & 6 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const config = process.env.MOBILE ? require( './packages/react-native-editor/babel.config' ) : {
presets: [ '@wordpress/babel-preset-default' ],
plugins: [ 'babel-plugin-inline-json-import' ],
};
module.exports = function( api ) {
dratwas marked this conversation as resolved.
Show resolved Hide resolved
api.cache( true );

return {
presets: [ '@wordpress/babel-preset-default' ],
plugins: [ 'babel-plugin-emotion', 'babel-plugin-inline-json-import' ],
};
api.cache.using( () => process.env.MOBILE ? 'mobile' : 'web' );
return config;
};
4 changes: 4 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions packages/react-native-editor/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/** @format */

module.exports = {
presets: [ 'module:metro-react-native-babel-preset' ],
plugins: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export NODE_BINARY=node\n../../../node_modules/react-native/scripts/react-native-xcode.sh\n";
shellScript = "export NODE_BINARY=node\nexport MOBILE=true\n../../../node_modules/react-native/scripts/react-native-xcode.sh packages/react-native-editor/index.js\n";
};
2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = {
isa = PBXShellScriptBuildPhase;
Expand Down
1 change: 0 additions & 1 deletion packages/react-native-editor/rn-cli.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const path = require( 'path' );
const enm = require( './extra-node-modules.config.js' );

module.exports = {
projectRoot: path.resolve( __dirname, './' ),
resolver: {
extraNodeModules: enm,
sourceExts: [ 'js', 'json', 'scss', 'sass' ],
Expand Down
1 change: 1 addition & 0 deletions rn-cli.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require( './packages/react-native-editor/rn-cli.config' );
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/** @flow
* @format */

const main = require( './jest.config.js' );
dratwas marked this conversation as resolved.
Show resolved Hide resolved

module.exports = {
Expand All @@ -10,8 +7,5 @@ module.exports = {
testMatch: [ '**/__device-tests__/**/*.test.[jt]s?(x)' ],
testPathIgnorePatterns: [
'/node_modules/',
'<rootDir>/gutenberg/gutenberg-mobile/',
'/gutenberg/test/',
'/gutenberg/packages/',
],
};
2 changes: 2 additions & 0 deletions test/unit/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ module.exports = {
'<rootDir>/.*/build/',
'<rootDir>/.*/build-module/',
'<rootDir>/.+\.native\.js$',
// This is temporary. In the future we should change the names of the native tests files to .native.js.
'/packages/react-native-editor',
dratwas marked this conversation as resolved.
Show resolved Hide resolved
],
transform: {
'^.+\\.[jt]sx?$': '<rootDir>/test/unit/scripts/babel-transformer.js',
Expand Down