diff --git a/fixtures/kitchensink/.env.development b/fixtures/kitchensink/.env.development new file mode 100644 index 0000000..9ead3c6 --- /dev/null +++ b/fixtures/kitchensink/.env.development @@ -0,0 +1,2 @@ +INFERNO_APP_X = x-from-development-env +INFERNO_APP_DEVELOPMENT = development diff --git a/fixtures/kitchensink/.env.local b/fixtures/kitchensink/.env.local new file mode 100644 index 0000000..82eae54 --- /dev/null +++ b/fixtures/kitchensink/.env.local @@ -0,0 +1,2 @@ +INFERNO_APP_X = x-from-original-local-env +INFERNO_APP_ORIGINAL_2 = override-from-original-local-env-2 diff --git a/fixtures/kitchensink/.env.production b/fixtures/kitchensink/.env.production new file mode 100644 index 0000000..5aac7fa --- /dev/null +++ b/fixtures/kitchensink/.env.production @@ -0,0 +1,2 @@ +INFERNO_APP_X = x-from-production-env +INFERNO_APP_PRODUCTION = production diff --git a/fixtures/kitchensink/src/features/env/PublicUrl.test.js b/fixtures/kitchensink/src/features/env/PublicUrl.test.js new file mode 100644 index 0000000..66763b8 --- /dev/null +++ b/fixtures/kitchensink/src/features/env/PublicUrl.test.js @@ -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(, div); + }); +}); diff --git a/fixtures/kitchensink/src/features/webpack/LinkedModules.js b/fixtures/kitchensink/src/features/webpack/LinkedModules.js new file mode 100644 index 0000000..1687455 --- /dev/null +++ b/fixtures/kitchensink/src/features/webpack/LinkedModules.js @@ -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

{v}

; +}; diff --git a/fixtures/kitchensink/src/features/webpack/LinkedModules.test.js b/fixtures/kitchensink/src/features/webpack/LinkedModules.test.js new file mode 100644 index 0000000..a484ac1 --- /dev/null +++ b/fixtures/kitchensink/src/features/webpack/LinkedModules.test.js @@ -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(, div); + }); +}); diff --git a/fixtures/kitchensink/src/index.js b/fixtures/kitchensink/src/index.js new file mode 100644 index 0000000..395e87d --- /dev/null +++ b/fixtures/kitchensink/src/index.js @@ -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(, document.getElementById('root'));