Skip to content
This repository was 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
trieloff wants to merge 2 commits into
mainfrom
iwannaseehowyoureact
Open

test(pipeline): add a test that demonstrates how to use a custom react component as the main function of a custom pipeline#1187
trieloff wants to merge 2 commits into
mainfrom
iwannaseehowyoureact

Conversation

@trieloff

@trieloff trieloff commented Nov 26, 2021

Copy link
Copy Markdown
Contributor

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
Copy Markdown

This PR will trigger no release when merged.

@codecov

codecov Bot commented Nov 26, 2021

Copy link
Copy Markdown

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.

@trieloff
trieloff requested a review from stefangrimm December 6, 2021 10:56
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.

1 participant