Skip to content

tests failing on Mac #223

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

Closed
jeffmcaffer opened this issue Oct 8, 2020 · 5 comments
Closed

tests failing on Mac #223

jeffmcaffer opened this issue Oct 8, 2020 · 5 comments
Assignees
Labels
engineering Will involve Docs Engineering stale There is no recent activity on this issue or pull request

Comments

@jeffmcaffer
Copy link
Contributor

What is the current behavior?

I cloned the repo, did npm install and npm test and got a number of failures shown below.

Note this was with Node 12.18.3 (npm 6.14.6) on Mac OS 10.15.7

``` ~/git/docs$ npm test

docs.github.com@ test /Users/jeffmcaffer/git/docs
jest && standard && npm run check-deps

PASS tests/content/remove-liquid-statements.js
PASS tests/unit/page.js (5.381 s)
PASS tests/content/category-pages.js (5.877 s)
PASS tests/routing/deprecated-enterprise-versions.js (39.664 s)
PASS tests/routing/redirects.js (43.153 s)
PASS tests/rendering/breadcrumbs.js (34.25 s)
PASS tests/routing/developer-site-redirects.js (50.398 s)
FAIL tests/rendering/server.js (56.332 s)
● static assets › fonts

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 404

  567 | describe('static assets', () => {
  568 |   test('fonts', async () => {
> 569 |     expect((await get('/dist/fonts/Inter-Medium.woff')).statusCode).toBe(200)
      |                                                                     ^
  570 |     expect((await get('/dist/fonts/Inter-Regular.woff')).statusCode).toBe(200)
  571 |   })
  572 | })

  at Object.<anonymous> (tests/rendering/server.js:569:69)
      at runMicrotasks (<anonymous>)

● stylesheets › compiles and sets the right content-type header

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 404

  665 |   it('compiles and sets the right content-type header', async () => {
  666 |     const res = await get('/dist/index.css')
> 667 |     expect(res.statusCode).toBe(200)
      |                            ^
  668 |     expect(res.headers['content-type']).toBe('text/css; charset=UTF-8')
  669 |   })
  670 | })

  at Object.<anonymous> (tests/rendering/server.js:667:28)
      at runMicrotasks (<anonymous>)

● client-side JavaScript bundle › returns a 200 response

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 404

  678 | 
  679 |   it('returns a 200 response', async () => {
> 680 |     expect(res.statusCode).toBe(200)
      |                            ^
  681 |   })
  682 | 
  683 |   it('sets the right content-type header', async () => {

  at Object.<anonymous> (tests/rendering/server.js:680:28)
      at runMicrotasks (<anonymous>)

● client-side JavaScript bundle › sets the right content-type header

expect(received).toBe(expected) // Object.is equality

Expected: "application/javascript; charset=UTF-8"
Received: "text/html; charset=utf-8"

  682 | 
  683 |   it('sets the right content-type header', async () => {
> 684 |     expect(res.headers['content-type']).toBe('application/javascript; charset=UTF-8')
      |                                         ^
  685 |   })
  686 | 
  687 |   // TODO: configure webpack to create production bundle in the test env

  at Object.<anonymous> (tests/rendering/server.js:684:41)
      at runMicrotasks (<anonymous>)

PASS tests/unit/liquid-helpers.js (21.265 s)
PASS tests/rendering/events.js (34.335 s)
● Console

console.log
  data should NOT have additional properties, data should NOT have additional properties, data should match exactly one schema in oneOf

  at middleware/events.js:24:56

console.log
  data should have required property 'type', data should NOT have additional properties, data should match exactly one schema in oneOf

  at middleware/events.js:24:56

console.log
  data should have required property 'url', data should NOT have additional properties, data should match exactly one schema in oneOf

  at middleware/events.js:24:56

console.log
  data.url should match format "uri", data should NOT have additional properties, data should match exactly one schema in oneOf

  at middleware/events.js:24:56

console.log
  data should have required property 'vote', data should NOT have additional properties, data should match exactly one schema in oneOf

  at middleware/events.js:24:56

console.log
  data.vote should be equal to one of the allowed values, data should NOT have additional properties, data should match exactly one schema in oneOf

  at middleware/events.js:24:56

console.log
  data.email should match format "email", data should NOT have additional properties, data should match exactly one schema in oneOf

  at middleware/events.js:24:56

console.log
  data.comment should be string, data should NOT have additional properties, data should match exactly one schema in oneOf

  at middleware/events.js:24:56

console.log
  data.category should be equal to one of the allowed values, data should NOT have additional properties, data should match exactly one schema in oneOf

  at middleware/events.js:24:56

console.log
  data should NOT have additional properties, data should NOT have additional properties, data should match exactly one schema in oneOf

  at middleware/events.js:24:56

console.log
  data should NOT have additional properties, data should NOT have additional properties, data should match exactly one schema in oneOf

  at middleware/events.js:24:56

console.log
  data should NOT have additional properties, data should have required property 'test', data should match exactly one schema in oneOf

  at middleware/events.js:24:56

console.log
  data should NOT have additional properties, data.group should be equal to one of the allowed values, data should match exactly one schema in oneOf

  at middleware/events.js:24:56

PASS tests/unit/pages.js (26.201 s)
PASS tests/rendering/robots-txt.js
PASS tests/rendering/header.js (37.275 s)
PASS tests/content/site-data.js (26.117 s)
PASS tests/content/lint-files.js (100.357 s)
PASS tests/content/graphql.js (22.673 s)
PASS tests/content/liquid-line-breaks.js (18.835 s)
PASS tests/unit/permalink.js
PASS tests/rendering/early-access-proxy.js
PASS tests/routing/middleware/redirects/help-to-docs.js
PASS tests/content/featured-links.js (35.996 s)
PASS tests/content/site-tree.js (34.16 s)
PASS tests/content/site-data-references.js (27.327 s)
PASS tests/unit/algolia/parse-page-sections-into-records.js
PASS tests/content/webhooks.js (30.935 s)
PASS tests/content/glossary.js (9.199 s)
PASS tests/unit/hydro.js
PASS tests/unit/products.js (31.765 s)
PASS tests/rendering/early-access-paths.js
PASS tests/rendering/octicon.js
PASS tests/content/algolia-search.js
PASS tests/rendering/rest.js (32.291 s)
PASS tests/unit/find-page.js
PASS tests/rendering/page-titles.js (33.27 s)
PASS tests/unit/liquid.js
PASS tests/unit/versions.js (35.216 s)
PASS tests/unit/enterprise-versions.js
PASS tests/unit/failbot.js
PASS tests/unit/actions-workflows.js
PASS tests/rendering/sidebar.js (36.861 s)
PASS tests/rendering/curated-homepage-links.js (38.831 s)
PASS tests/rendering/head.js (34.839 s)
PASS tests/meta/orphan-tests.js
PASS tests/unit/languages.js
PASS tests/links-and-images/links-and-images.js (128.414 s)
PASS tests/unit/algolia/rank.js
PASS tests/unit/feature-flags.js
PASS tests/unit/product-names.js
PASS tests/content/gitignore.js
PASS tests/content/crowdin-config.js
PASS tests/unit/toc-links.js (41.24 s)
(node:1530) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
PASS tests/routing/language-code-redirects.js (30.538 s)
PASS tests/rendering/footer.js (30.62 s)
PASS tests/rendering/csrf-route.js (25.021 s)
PASS tests/routing/top-developer-site-path-redirects.js (38.56 s)
PASS tests/links-and-images/developer-links-and-images.js (303.602 s)
A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --runInBand --detectOpenHandles to find leaks.

Summary of all failing tests
FAIL tests/rendering/server.js (56.332 s)
● static assets › fonts

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 404

  567 | describe('static assets', () => {
  568 |   test('fonts', async () => {
> 569 |     expect((await get('/dist/fonts/Inter-Medium.woff')).statusCode).toBe(200)
      |                                                                     ^
  570 |     expect((await get('/dist/fonts/Inter-Regular.woff')).statusCode).toBe(200)
  571 |   })
  572 | })

  at Object.<anonymous> (tests/rendering/server.js:569:69)
      at runMicrotasks (<anonymous>)

● stylesheets › compiles and sets the right content-type header

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 404

  665 |   it('compiles and sets the right content-type header', async () => {
  666 |     const res = await get('/dist/index.css')
> 667 |     expect(res.statusCode).toBe(200)
      |                            ^
  668 |     expect(res.headers['content-type']).toBe('text/css; charset=UTF-8')
  669 |   })
  670 | })

  at Object.<anonymous> (tests/rendering/server.js:667:28)
      at runMicrotasks (<anonymous>)

● client-side JavaScript bundle › returns a 200 response

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 404

  678 | 
  679 |   it('returns a 200 response', async () => {
> 680 |     expect(res.statusCode).toBe(200)
      |                            ^
  681 |   })
  682 | 
  683 |   it('sets the right content-type header', async () => {

  at Object.<anonymous> (tests/rendering/server.js:680:28)
      at runMicrotasks (<anonymous>)

● client-side JavaScript bundle › sets the right content-type header

expect(received).toBe(expected) // Object.is equality

Expected: "application/javascript; charset=UTF-8"
Received: "text/html; charset=utf-8"

  682 | 
  683 |   it('sets the right content-type header', async () => {
> 684 |     expect(res.headers['content-type']).toBe('application/javascript; charset=UTF-8')
      |                                         ^
  685 |   })
  686 | 
  687 |   // TODO: configure webpack to create production bundle in the test env

  at Object.<anonymous> (tests/rendering/server.js:684:41)
      at runMicrotasks (<anonymous>)

Test Suites: 1 failed, 55 passed, 56 total
Tests: 4 failed, 67 skipped, 2 todo, 22825 passed, 22898 total
Snapshots: 0 total
Time: 304.86 s
Ran all test suites.
npm ERR! Test failed. See above for more details.
~/git/docs$ node --version
v12.18.3
~/git/docs$

</details>

cc: @github/docs-engineering 
@jeffmcaffer jeffmcaffer added the engineering Will involve Docs Engineering label Oct 8, 2020
@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Oct 8, 2020
@janiceilene
Copy link
Contributor

Thanks @jeffmcaffer I'll let @github/docs-engineering know this is ready for a review!

@janiceilene janiceilene removed the triage Do not begin working on this issue until triaged by the team label Oct 8, 2020
@zeke
Copy link
Contributor

zeke commented Oct 8, 2020

Quick workaround: npm run build once before running the tests.

I opened an issue yesterday to discuss how to actually fix this: #222

cc @JasonEtco

@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2020

This issue is stale because it has been open 60 days with no activity.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2021

This issue is stale because it has been open 60 days with no activity.

@github-actions github-actions bot added the stale There is no recent activity on this issue or pull request label Feb 7, 2021
@JamesMGreene
Copy link
Member

This is a non-issue if you follow the development instructions as outlined in https://github.com/github/docs/blob/main/contributing/development.md#getting-started (updated)

If you have other ideas on how to improve the experience, please discuss in #222. Thank you!

@JamesMGreene JamesMGreene self-assigned this Feb 7, 2021
jnidzwetzki pushed a commit to jnidzwetzki/docs that referenced this issue Oct 6, 2022
* File setup

* Add & edit bulk upload from .csv content

* Fix anchor (?)

* Fix link in admon

* Remove unused link

* Fix brackets in anchor link

* Add remaining ingest methods, and reorg

* Apply suggestions from code review

Co-authored-by: Ryan Booz <ryan@timescale.com>

* Remove JDBC instructions, add xref to Code QSs

Co-authored-by: Ryan Booz <ryan@timescale.com>
Co-authored-by: Jacob Prall <prall.jacob@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engineering Will involve Docs Engineering stale There is no recent activity on this issue or pull request
Projects
None yet
Development

No branches or pull requests

5 participants
@zeke @JamesMGreene @janiceilene @jeffmcaffer and others