Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

test(pipeline): add a test that demonstrates how to use a custom react component as the main function of a custom pipeline #1187

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

trieloff
Copy link
Contributor

@trieloff trieloff commented Nov 26, 2021

uses React.createElement, so I don't have to worry about JSX and bundlers. Uses getServerSideProps like next.js, this could be used to fetch additional data from a GraphQL endpoint

$ npx mocha   test/testReactInPipeline.js
Forcing HTTP/1.1 for Helix-Fetch


  Testing HTML Pipeline Overrides
fetching additional stuff
<html><head></head><body><div data-reactroot=""> <i class="its-not-semantic-html-but-i-like-it">World</i></div></body></html>
    ✔ html.pipe adds headers from meta and link tags (385ms)


  1 passing (397ms)

…t component as the main function of a custom pipeline

uses `React.createElement`, so I don't have to worry about JSX and bundlers. Uses `getServerSideProps` like next.js, this could be used to fetch additional data from a GraphQL endpoint
@github-actions
Copy link

This PR will trigger no release when merged.

@codecov
Copy link

codecov bot commented Nov 26, 2021

Codecov Report

Merging #1187 (a441373) into main (34d7e56) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##              main     #1187   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           59        59           
  Lines         1559      1559           
=========================================
  Hits          1559      1559           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f55dd34...a441373. Read the comment docs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant