You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+3-1
Original file line number
Diff line number
Diff line change
@@ -48,8 +48,10 @@ When you are adding code to Prebid.js, or modifying code that isn't covered by a
48
48
-_Assert_: check that the expected results have occurred
49
49
- e.g., use Chai assertions to check that the expected output is equal to the actual output
50
50
- Test the public interface, not the internal implementation
51
-
- If you need to check `adloader.loadScript` in a test, use a `stub` rather than a `spy`. `spy`s trigger a network call which can result in a `script error` and cause unrelated unit tests to fail. `stub`s will let you gather information about the `adloader.loadScript` call without affecting external resources
51
+
- If you need to check `adloader.loadExternalScript` in a test, use a `stub` rather than a `spy`. `spy`s trigger a network call which can result in a `script error` and cause unrelated unit tests to fail. `stub`s will let you gather information about the `adloader.loadExternalScript` call without affecting external resources
52
+
- If your test makes ajax requests, use the global xhr stub in `test/mocks/xhr`. Do not use your own `sinon.useFakeXMLHttpRequest()` or `sinon.createFakeServer()`.
52
53
- When writing tests you may use ES2015 syntax if desired
54
+
- If your test relies on `Window` or `global` object, do not mutate that object directly. Instead, create a separate copy of that object and perform operations on that new copy.
53
55
54
56
### Test Examples
55
57
Prebid.js already has many tests. Read them to see how Prebid.js is tested, and for inspiration:
Copy file name to clipboardExpand all lines: PR_REVIEW.md
+3-1
Original file line number
Diff line number
Diff line change
@@ -16,9 +16,11 @@ For modules and core platform updates, the initial reviewer should request an ad
16
16
- If the change results in needing updates to docs (such as public API change, module interface etc), add a label for "needs docs" and inform the submitter they must submit a docs PR to update the appropriate area of Prebid.org **before the PR can merge**. Help them with finding where the docs are located on prebid.org if needed.
17
17
- Below are some examples of bidder specific updates that should require docs update (in their dev-docs/bidders/bidder.md file):
18
18
- Add support for GDPR consentManagement module > add `gdpr_supported: true`
19
+
- Add support for US Privacy consentManagement module > add `usp_supported: true`
19
20
- Add support for userId module > add `userId: pubCommon, digitrust, newProviderHere`
20
21
- Add support for video and/or native mediaTypes > add `media_types: video, native`
21
22
- Add support for COPPA > add `coppa_supported: true`
23
+
- Add support for SChain > add `schain_supported: true`
22
24
- If all above is good, add a `LGTM` comment and request 1 additional core member to review.
23
25
- Once there is 2 `LGTM` on the PR, merge to master
24
26
- Ask the submitter to add a PR for documentation if applicable.
@@ -29,7 +31,7 @@ For modules and core platform updates, the initial reviewer should request an ad
29
31
- Follow steps above for general review process. In addition, please verify the following:
30
32
- Verify that bidder has submitted valid bid params and that bids are being received.
31
33
- Verify that bidder is not manipulating the prebid.js auction in any way or doing things that go against the principles of the project. If unsure check with the Tech Lead.
32
-
- Verify that the bidder is being as efficient as possible, ideally not loading an external library, however if they do load a library it should be cached.
34
+
- Verify that the bidder is being as efficient as possible, ideally not loading an external library, however if they do load a library it should be cached.
33
35
- Verify that code re-use is being done properly and that changes introduced by a bidder don't impact other bidders.
34
36
- If the adapter being submitted is an alias type, check with the bidder contact that is being aliased to make sure it's allowed.
35
37
- If the adapter is triggering any user syncs make sure they are using the user sync module in the Prebid.js core.
0 commit comments