Closed konsumer closed 6 years ago
I started out trying to resolve #35 , but my solution didn't work. In the process, I got test-parity with react, so I'm going to stop there for now.
Seems good on both counts, after last commit. Tests pass & no context-warnings.
@konsumer: thanks for the PR! 🎉
Looked good from PR-level, but build is now failing on master
:(
Build passing now. But still has warnings:
$ (cd ./packages/proppy-preact/ && npm test)
> proppy-preact@1.2.6 test /Users/FHeylaal/Repos/proppy/packages/proppy-preact
> ../../node_modules/.bin/jest --
PASS src/attach.spec.tsx
● Console
console.warn node_modules/preact-context/dist/cjs/context.js:32
Consumer used without a Provider
console.warn node_modules/preact-context/dist/cjs/context.js:32
Consumer used without a Provider
console.warn node_modules/preact-context/dist/cjs/context.js:32
Consumer used without a Provider
console.warn node_modules/preact-context/dist/cjs/context.js:32
Consumer used without a Provider
console.warn node_modules/preact-context/dist/cjs/context.js:32
Consumer used without a Provider
PASS src/index.spec.ts
Test Suites: 2 passed, 2 total
Tests: 7 passed, 7 total
Snapshots: 0 total
Time: 1.85s, estimated 2s
Ran all test suites.
Hmm, yeh, I think I need to take another look. I'm not quite sure I'm even testing the right things. I tried to pattern it after the react tests, but I think context just works a bit different with preact. I will have another look, soon.
use ProppyContext's Provider for ProppyProvider