Skip to content
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

Testing helper TCModelFactory doesn't work anymore. #418

Open
nejcsever opened this issue Sep 9, 2023 · 0 comments
Open

Testing helper TCModelFactory doesn't work anymore. #418

nejcsever opened this issue Sep 9, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@nejcsever
Copy link

Module
@iabtechlabtcf/testing

Version
1.5.9

Description
With the new GVL v3 (TCF 2.2) support, TCModelFactory stopped working.

Functions TCModelFactory.noGVL(); and TCModelFactory.withGVL(); throw the following error:
Error: Cannot find module './vendorlist/v2/vendor-list.json' from 'node_modules/@iabtechlabtcf/testing/lib/cjs/GVLFactory.js'

The reason is that TCModelFactory uses GVLFactory.getLatest() inside which calls the GVL resource with schema value of "v2" and for "v2" there's no latest vendor list json (./vendorlist/v2/vendor-list.json). This only works with "v2.2" passed as a schema parameter in GVLFactory.getLatest("v2.2").

The solution would be to change the default behaviour or add schema or any other parameters to the TCModelFactory functions.

I worked around this issue by manually creating TCModel and attaching gvl with GVLFactory.getLatest("v2.2") but I thought it's worth reporting that TCModelFactory is broken with the TCF 2.2 updates.

@nejcsever nejcsever added the bug Something isn't working label Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant