Skip to content

Commit

Permalink
Rename test/functional dir to test/unit (#20185)
Browse files Browse the repository at this point in the history
* Rename test/functional dir to test/unit

* Update unit test dir in  ads/README.md
  • Loading branch information
estherkim authored and danielrozenberg committed Jan 8, 2019
1 parent 7400700 commit d511ba3
Show file tree
Hide file tree
Showing 160 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion ads/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ gulp test --watch --nobuild --files=test/functional/{test-ads-config.js,test-int
```

If you have non-trivial logic in `/ads/yournetwork.js`, adding a unit test at `/test/functional/ads/test-yournetwork.js` is highly recommended.
If you have non-trivial logic in `/ads/yournetwork.js`, adding a unit test at `/test/unit/ads/test-yournetwork.js` is highly recommended.

### Lint and type-check

Expand Down
6 changes: 3 additions & 3 deletions build-system/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,19 @@ const chaiAsPromised = [
];

const unitTestPaths = [
'test/functional/**/*.js',
'test/unit/**/*.js',
'ads/**/test/test-*.js',
'extensions/**/test/*.js',
];

const unitTestOnSaucePaths = [
'test/functional/**/*.js',
'test/unit/**/*.js',
'ads/**/test/test-*.js',
];

const integrationTestPaths = [
'test/integration/**/*.js',
'test/functional/test-error.js',
'test/unit/test-error.js',
'extensions/**/test/integration/**/*.js',
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ describes.realWin('amp-ad-network-adsense-impl', {
exp ? '' : 'immediate');
expect(impl.ampAnalyticsElement_).to.be.ok;
// Exact format of amp-analytics element covered in
// test/functional/test-analytics.js.
// test/unit/test-analytics.js.
// Just ensure extensions is loaded, and analytics element appended.
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ describes.realWin('amp-ad-network-doubleclick-impl', realWinConfig, env => {
exp ? '' : 'immediate');
expect(impl.ampAnalyticsElement_).to.be.ok;
// Exact format of amp-analytics element covered in
// test/functional/test-analytics.js.
// test/unit/test-analytics.js.
// Just ensure extensions is loaded, and analytics element appended.
});
});
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion test/functional/test-3p.js → test/unit/test-3p.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ describe('3p', () => {
});

it('should handle onSuccess callback', done => {
loadScript(window, 'http://localhost:9876/test/functional/test-3p.js', () => {
loadScript(window, 'http://localhost:9876/test/unit/test-3p.js', () => {
done();
}, () => {
done('onError should not be called!');
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion validator/engine/parse-srcset_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* Credits:
* Original version of this file was derived from
* https://github.com/ampproject/amphtml/blob/master/test/functional/test-srcset.js
* https://github.com/ampproject/amphtml/blob/master/test/unit/test-srcset.js
*/
goog.provide('parse_srcset.ParseSrcsetTest');
goog.require('parse_srcset.parseSrcset');
Expand Down
2 changes: 1 addition & 1 deletion validator/testdata/feature_tests/amp_layouts.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
-->
<!--
Test Description:
This is a (partial) transcription from test/functional/test-layout.js.
This is a (partial) transcription from test/unit/test-layout.js.
-->
<!doctype html>
<html >
Expand Down
2 changes: 1 addition & 1 deletion validator/testdata/feature_tests/amp_layouts.out
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ FAIL
| -->
| <!--
| Test Description:
| This is a (partial) transcription from test/functional/test-layout.js.
| This is a (partial) transcription from test/unit/test-layout.js.
| -->
| <!doctype html>
| <html ⚡>
Expand Down

0 comments on commit d511ba3

Please sign in to comment.