ember-fastboot / ember-cli-fastboot

Server-side rendering for Ember.js apps
http://ember-fastboot.com/
MIT License
852 stars 160 forks source link

Testing ember-cli-fastboot-testing in new test-package #832

Closed ankushdharkar closed 3 years ago

ankushdharkar commented 3 years ago

Closes #831

Test results ## Node -> v14.17.0 ``` yarn test yarn run v1.22.10 $ npm-run-all lint:* test:* $ ember-template-lint . $ eslint . $ ember test DEBUG: Ember : 3.19.0 DEBUG: Ember Data : 3.19.0 DEBUG: ------------------------------- ok 1 Chrome 90.0 - [210 ms] - FastBoot | home-page: it renders a page... ok 2 Chrome 90.0 - [0 ms] - ember-qunit: Ember.onerror validation: Ember.onerror is functioning properly 1..2 # tests 2 # pass 2 # skip 0 # todo 0 # fail 0 # ok $ mocha generating package.json with customized fingerprinting options ✓ builds a package.json ✓ respects a custom asset map path and prepended URLs ✓ respects individual files being excluded from fingerprinting with custom htmlFile ✓ uses custom htmlFile in the manifest 4 passing (28s) ✨ Done in 50.63s. ``` ## Node -> v16.2.0 ``` yarn test yarn run v1.22.10 $ npm-run-all lint:* test:* $ ember-template-lint . $ eslint . $ ember test DEBUG: Ember : 3.19.0 DEBUG: Ember Data : 3.19.0 DEBUG: ------------------------------- ok 1 Chrome 90.0 - [185 ms] - FastBoot | home-page: it renders a page... ok 2 Chrome 90.0 - [1 ms] - ember-qunit: Ember.onerror validation: Ember.onerror is functioning properly 1..2 # tests 2 # pass 2 # skip 0 # todo 0 # fail 0 # ok $ mocha generating package.json with customized fingerprinting options ✓ builds a package.json ✓ respects a custom asset map path and prepended URLs ✓ respects individual files being excluded from fingerprinting with custom htmlFile ✓ uses custom htmlFile in the manifest 4 passing (29s) ✨ Done in 55.99s. ``` ## Other tests: Node -> v14.17.0 ``` yarn workspace integration-tests test 7 passing (1m) ✨ Done in 65.76s. ✨ Done in 66.15s ``` ``` yarn workspace basic-app test:mocha 35 passing (3m) ✨ Done in 189.94s. ✨ Done in 190.33s. ``` ``` yarn workspace ember-cli-fastboot test:ember yarn workspace ember-cli-fastboot test:ember yarn workspace v1.22.10 yarn run v1.22.10 $ ember test WARNING: Node v14.17.0 is not tested against Ember CLI on your platform. We recommend that you use the most-recent "Active LTS" version of Node.js. See https://git.io/v7S5n for details. ⠋ BuildingBrowserslist: caniuse-lite is outdated. Please run: npx browserslist@latest --update-db The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined ```
ankushdharkar commented 3 years ago

@kiwiupover A new yarn.lock was generated as I added the new dependency.

ankushdharkar commented 3 years ago
Test results ``` yarn workspace ember-cli-fastboot-testing-app test:ember yarn workspace v1.22.10 yarn run v1.22.10 $ ember test Browserslist: caniuse-lite is outdated. Please run: npx browserslist@latest --update-db Environment: test ⠼ building... [Babel: @ember/test-helpers > applyPatches]The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten DEBUG: ------------------------------- DEBUG: Ember : 3.19.0 DEBUG: Ember Data : 3.19.0 DEBUG: ------------------------------- ok 1 Chrome 90.0 - [160 ms] - FastBoot | home-page: it renders the welcome page ok 2 Chrome 90.0 - [0 ms] - ember-qunit: Ember.onerror validation: Ember.onerror is functioning properly 1..2 # tests 2 # pass 2 # skip 0 # todo 0 # fail 0 # ok ✨ Done in 25.61s. ✨ Done in 25.96s. ```
ankushdharkar commented 3 years ago

@kiwiupover Thanks for reviewing. Made the changes. Please recheck.

kiwiupover commented 3 years ago

Looks great. Thanks heaps mate.

mansona commented 3 years ago

I think we should probably try and limit the files we add to the test apps to literally only what we need to have the tests pass 🤔 there is no need in bloating with extra READMEs etc

What does everyone think?

ankushdharkar commented 3 years ago

@snewcomer @mansona Stripped away the extra devDependencies and removed unnecessary files. Let me know if something else can be removed that I missed.

kiwiupover commented 3 years ago

@ankushdharkar I just realized you need to remove the yarn.lock from this PR. then run yarn in the root of the monorepo.

ankushdharkar commented 3 years ago

Confirmed the tests once

Test results ## Node -> v14.17.0 ``` yarn test yarn run v1.22.10 $ npm-run-all lint:* test:* $ ember-template-lint . $ eslint . $ ember test DEBUG: ------------------------------- DEBUG: Ember : 3.19.0 DEBUG: Ember Data : 3.19.0 DEBUG: ------------------------------- ok 1 Chrome 91.0 - [313 ms] - FastBoot | index-page: it renders the index page ok 2 Chrome 91.0 - [1 ms] - ember-qunit: Ember.onerror validation: Ember.onerror is functioning properly 1..2 # tests 2 # pass 2 # skip 0 # todo 0 # fail 0 # ok ✨ Done in 45.37s. ```
kiwiupover commented 3 years ago

@ankushdharkar I'm sorry my comment about the yarn.lock was wrong. I thought there was on included in the application you created.