profile
viewpoint
Emery Coxe wokkaflokka Stumpgrindin', Inc. On the interwebz http://stumpgrindin.com

ajaywaghray/Incrediband 1

Incrediband

wokkaflokka/ccv 1

C-based/Cached/Core Computer Vision Library, A Modern Computer Vision Library

firstdollar/json-schema-to-markdown 0

Turn a JSON Schema into a markdown file.

jchudev/DaggerExample 0

Very basic implementation of Dagger use in Android.

wokkaflokka/adapterviewprotocol-loop-demo 0

demonstrates an infinite loop in Espresso's DataInteraction and AdapterViewProtocol components

wokkaflokka/AirChat 0

Free Communications For Everyone.

wokkaflokka/AlgoDS 0

Implementation of Algorithms and Data Structures, Interview Questions and Answers

wokkaflokka/algorithms 0

Minimal examples of data structures and algorithms in Python

startedoakes/odoyle-rules

started time in 5 days

issue commentplaid/react-plaid-link

Export PlaidLinkOptions in Typescript

Please see #134 for a proposed fix.

aymanbagabas

comment created time in 22 days

PR opened plaid/react-plaid-link

FIX: Export `PlaidLinkOptions`

Resolves #98.

+1 -0

0 comment

1 changed file

pr created time in 22 days

push eventwokkaflokka/react-plaid-link

Emery Coxe

commit sha dce9e2a85a7b4e3cede6c8325eb354197aec4dd2

FIX: Export `PlaidLinkOptions` Resolves #98.

view details

push time in 22 days

startedpelias/placeholder

started time in a month

create barnchfirstdollar/json-schema-to-markdown

branch : enums

created branch time in a month

startedcloudflare/json-schema-tools

started time in a month

startedpelotom/runtypes

started time in a month

issue commentnytimes/react-tracking

Provide testing/mocking instructions and export react-tracking/mock

@tizmagik cc @l225li

With respect to the comment from @l225li, I also observed this issue recently when integrating react-tracking. In my case, our project is a typescript project using stateless functional components and ES module imports, and using jest for testing.

By default, jest mocks do not support ES module semantics; when react-tracking was not mocked for ES module syntax, I observed variants of the error described by @l225li.

 FAIL  src/components/pages/Foo/Bar/Baz/__tests__/Baz.test.tsx
  ● Test suite failed to run

    TypeError: (0 , _reactTracking.default)(...) is not a function

      120 | }
      121 | 
    > 122 | export default track({
          |                ^
      123 |   event: 'foo-bar.baz.presented',
      124 | })(Baz)
      125 | 

      at Object.<anonymous> (src/components/pages/Foo/Bar/Baz/Baz.tsx:123:12)
      at Object.<anonymous> (src/components/pages/Foo/Bar/Baz/__tests__/Baz.test.tsx:10:1)

This prevented me from mocking react-tracking using a manual mock; however, I was able to get a satisfactory mocking solution using the following configuration.

jest.mock('react-tracking', () => {
    const trackEvent = jest.fn()
    return {
        __esModule: true,
        default: jest.fn(() => (id) => id),
        useTracking: jest.fn(() => ({
            trackEvent,
        })),
    }
})

Hope this helps.

Aside: really love the work NYT team has done with this library. In recent years I have spent a lot of time working on Android (where NYT team also shines), and was very pleasantly surprised to find this library, which shares a core philosophy and solves foundational problems I encountered in past projects in the mobile space. Great job.

tizmagik

comment created time in a month

startedairbnb/ts-migrate

started time in a month

startednytimes/react-tracking

started time in a month

startedhazelcast/hazelcast-jet

started time in a month

startedrems-project/sail

started time in a month

startedksensehq/eventnative

started time in a month

startedDebdut/omg-curry

started time in a month

startedgithub/archive-program

started time in a month

startedburaksezer/olric

started time in a month

startedsimdjson/simdjson

started time in a month

startedhephaest0s/usbkill

started time in a month

startedacidanthera/OpenCorePkg

started time in a month

startedolofk/edalize

started time in a month

startedlukasz-madon/awesome-concepts

started time in a month

startedfrida/frida

started time in 2 months

startedGaloisInc/crucible

started time in 2 months

startedGaloisInc/what4

started time in 2 months

startedfacebook/docusaurus

started time in 2 months

startedmoufette-tools/moufette

started time in 2 months

startedOpenHFT/Chronicle-Queue

started time in 2 months

startedpeter-lawrey/Java-Chronicle

started time in 2 months

startedquestdb/questdb

started time in 2 months

startedplant99/felicette

started time in 2 months

startedgoogle/flatbuffers

started time in 2 months

startedhwayne/awesome-cold-showers

started time in 2 months

startedrowsncolumns/grid

started time in 2 months

startedsquzy/squzy

started time in 2 months

startedShawn-Shan/fawkes

started time in 2 months

startedreturntocorp/semgrep

started time in 2 months

startedIBM/graphql-query-generator

started time in 2 months

startedRequarks/wiki

started time in 2 months

startedumputun/remark42

started time in 2 months

startedzombodb/pgx

started time in 2 months

startedcpetrich/counterfeit_DS18B20

started time in 2 months

started2020PB/police-brutality

started time in 3 months

startedteam-video/aviary.sh

started time in 3 months

startedgoogle/wuffs

started time in 3 months

startedOpenDiablo2/OpenDiablo2

started time in 3 months

startedgrin-compiler/grin

started time in 3 months

startedschenkd/nginx-ui

started time in 3 months

startedgoogle/tsunami-security-scanner

started time in 3 months

startedjina-ai/jina

started time in 3 months

more