Add fixtures folder
This commit is contained in:
parent
0a119f4664
commit
e10a95c46f
2
fixtures/kitchensink/.env.development
Normal file
2
fixtures/kitchensink/.env.development
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
INFERNO_APP_X = x-from-development-env
|
||||||
|
INFERNO_APP_DEVELOPMENT = development
|
2
fixtures/kitchensink/.env.local
Normal file
2
fixtures/kitchensink/.env.local
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
INFERNO_APP_X = x-from-original-local-env
|
||||||
|
INFERNO_APP_ORIGINAL_2 = override-from-original-local-env-2
|
2
fixtures/kitchensink/.env.production
Normal file
2
fixtures/kitchensink/.env.production
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
INFERNO_APP_X = x-from-production-env
|
||||||
|
INFERNO_APP_PRODUCTION = production
|
16
fixtures/kitchensink/src/features/env/PublicUrl.test.js
vendored
Normal file
16
fixtures/kitchensink/src/features/env/PublicUrl.test.js
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) 2015-present, Facebook, Inc.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { render } from 'inferno';
|
||||||
|
import PublicUrl from './PublicUrl';
|
||||||
|
|
||||||
|
describe('PUBLIC_URL', () => {
|
||||||
|
it('renders without crashing', () => {
|
||||||
|
const div = document.createElement('div');
|
||||||
|
render(<PublicUrl />, div);
|
||||||
|
});
|
||||||
|
});
|
18
fixtures/kitchensink/src/features/webpack/LinkedModules.js
Normal file
18
fixtures/kitchensink/src/features/webpack/LinkedModules.js
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) 2015-present, Facebook, Inc.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import Inferno from 'inferno';
|
||||||
|
import './assets/style.css';
|
||||||
|
import { test, version } from 'test-integrity';
|
||||||
|
|
||||||
|
export default () => {
|
||||||
|
const v = version();
|
||||||
|
if (!test() || v !== '2.0.0') {
|
||||||
|
throw new Error('Functionality test did not pass.');
|
||||||
|
}
|
||||||
|
return <p id="feature-linked-modules">{v}</p>;
|
||||||
|
};
|
@ -0,0 +1,23 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) 2015-present, Facebook, Inc.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import Inferno from 'inferno';
|
||||||
|
import InfernoDOM from 'inferno-dom';
|
||||||
|
import { test, version } from 'test-integrity';
|
||||||
|
import LinkedModules from './LinkedModules';
|
||||||
|
|
||||||
|
describe('linked modules', () => {
|
||||||
|
it('has integrity', () => {
|
||||||
|
expect(test());
|
||||||
|
expect(version() === '2.0.0');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('renders without crashing', () => {
|
||||||
|
const div = document.createElement('div');
|
||||||
|
InfernoDOM.render(<LinkedModules />, div);
|
||||||
|
});
|
||||||
|
});
|
11
fixtures/kitchensink/src/index.js
Normal file
11
fixtures/kitchensink/src/index.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) 2015-present, Facebook, Inc.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { render } from 'inferno';
|
||||||
|
import App from './App';
|
||||||
|
|
||||||
|
render(<App />, document.getElementById('root'));
|
Loading…
Reference in New Issue
Block a user