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 regression from #452 #619

Closed
zachleat opened this issue Jul 20, 2019 · 2 comments
Closed

Testing regression from #452 #619

zachleat opened this issue Jul 20, 2019 · 2 comments
Assignees
Milestone

Comments

@zachleat
Copy link
Member

cc @MadeByMike

Before #452 was merged, this was the output from npx ava --verbose test/TemplateWriterTest.js

npx ava --verbose test/TemplateWriterTest.js

  - renderData should exist and be resolved in a collection (Issue #289)
  - Markdown with alias
  - JavaScript with alias
  ✔ Glob Watcher Files with Passthroughs
  ✔ _createTemplateMap (no leading dot slash) (217ms)
  ✔ Write Test 11ty.js (193ms)
  ✔ _getCollectionsData with custom collection (ascending) (272ms)
  ✔ _getCollectionsData with custom collection (descending) (273ms)
  ✔ _getCollectionsData with custom collection (filter only to markdown input) (274ms)
  ✔ Custom collection returns array (253ms)
  ✔ Custom collection returns a string (254ms)
  ✔ Custom collection returns an object (256ms)
  ✔ Output is a subdir of input (322ms)
  ✔ _createTemplateMap (298ms)
  ✔ getCollectionsData (295ms)
  ✔ _testGetAllTags (294ms)
  ✔ Collection of files sorted by date (297ms)
  ✔ fileSlug should exist in a collection (275ms)
  ✔ Pagination with a Collection (319ms)
  ✔ Use a collection inside of a layout (327ms)
  ✔ Use a collection inside of a template (330ms)
  ✔ Pagination and TemplateContent (316ms)
  ✔ Pagination with a Collection from another Paged Template (341ms)
  ✔ Pagination with a Collection (apply all pages to collections) (343ms)

  21 tests passed
  3 tests skipped

The tests all were under 400ms each.

Now after #452, it looks like there are some mega tests happening here via npx ava --verbose test/TemplateWriterTest.js:

 - renderData should exist and be resolved in a collection (Issue #289)
  - Markdown with alias
  - JavaScript with alias
  ✔ Glob Watcher Files with Passthroughs
  ✔ _createTemplateMap (no leading dot slash)
  ✔ Write Test 11ty.js (184ms)
  ✔ _getCollectionsData with custom collection (ascending) (263ms)
  ✔ _getCollectionsData with custom collection (descending) (261ms)
  ✔ _getCollectionsData with custom collection (filter only to markdown input) (262ms)
  ✔ Custom collection returns array (240ms)
  ✔ Custom collection returns a string (240ms)
  ✔ Custom collection returns an object (241ms)
  ✔ Output is a subdir of input (307ms)
  ✔ _createTemplateMap (290ms)
  ✔ _testGetAllTags (278ms)
  ✔ Collection of files sorted by date (280ms)
  ✔ getCollectionsData (287ms)
  ✔ fileSlug should exist in a collection (262ms)
  ✔ Naughty Passthrough paths (269ms)
  ✔ Pagination with a Collection (345ms)
  ✔ Use a collection inside of a layout (412ms)
  ✔ Use a collection inside of a template (446ms)
  ✔ Pagination and TemplateContent (439ms)
  ✔ Passthrough file output (1m 8.2s)
  ✔ Pagination with a Collection from another Paged Template (2m 8.8s)
  ✔ Pagination with a Collection (apply all pages to collections) (3m 8s)

  23 tests passed
  3 tests skipped

Note the 1m 8s, 2m 9s, 3m 8s tests. Two steps here:

  1. make sure this isn't a performance regression.
  2. make these tests faster
@zachleat
Copy link
Member Author

It worked fine with --serial and also worked fine when I duplicated the other pre-PR TemplateWriterTest that used .write().

I moved one of the new .write() tests into TemplatePassthroughManagerTest and that seems to have resolved it for now.

@zachleat
Copy link
Member Author

A very quick test of eleventy-bench seems to indicate that things are okay there, although it’s not using passthroughCopy globs (which is fine too)

image

Also ignore the second version there, I just hadn’t changed my local package.json yet for the next version.

@zachleat zachleat self-assigned this Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant