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

changing globalVarName breaks tests, adapter #1437

Closed
dantarion opened this issue Jul 28, 2017 · 0 comments
Closed

changing globalVarName breaks tests, adapter #1437

dantarion opened this issue Jul 28, 2017 · 0 comments

Comments

@dantarion
Copy link
Contributor

dantarion commented Jul 28, 2017

Type of issue

Bug

Description

Changing globalVarName in package.json is supposed to change the pbjs global, but doing so breaks some tests, and an adapter

pbjs hardcoded references:

/modules/

./bidfluenceBidAdapter.js - Used as a variable name, ok
./conversantBidAdapter.js - Used in a comment, ok
./eplanningBidAdapter.js - Used in query string and comment, ok
./express.js - Used in a comment, ok
./gumgumBidAdapter.js - Not sure, tests don't fail. ok?
./indexExchangeBidAdapter.js - Used in query string, ok
./jcmBidAdapter.js - Hardcoded into callback initialization (Breaks adapter and test)
./rubiconBidAdapter.js - Used in string, ok
./smartadserverBidAdapter.js - Used in string, ok

/test/spec/modules/
I'm not as familiar with the testing system so I didn't go through these.

./adbladeBidAdapter_spec.js
./adbutlerBidAdapter_spec.js
./adsupplyBidAdapter_spec.js
./eplanningBidAdapter_spec.js
./kargoBidAdapter_spec.js
./mobfoxBidAdapter_spec.js
./piximediaBidAdapter_spec.js
./prebidServerBidAdapter_spec.js
./rhythmoneBidAdapter_spec.js
./rubiconBidAdapter_spec.js
./smartadserverBidAdapter_spec.js
./tapsenseBidAdapter_spec.js
./trionBidAdapter_spec.js
./widespaceBidAdapter_spec.js
./yieldbotBidAdapter_spec.js

Steps to reproduce

  1. Checkout master branch
  2. gulp serve, wait for tests to pass
  3. Edit package.json change globalVarName to pbjs2
  4. gulp serve, wait for tests to pass

Expected results

All tests pass both times

Actual results

Tests fail when globalVarName isn't pbjs

Other information

I did a rudimentary find/replace with $$PREBID_GLOBAL$$ and I was able to get the failed tests to pass, but that broke several others that were using pbjs string in ways unrelated to globalVarName

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

No branches or pull requests

1 participant