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

Sort the examples in the CF template #795

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

amendlik
Copy link

The code previously produced CF code from a listing of files from the fs.readdirSync() function. The problem is that the order of the files returned by fs.readdirSync() is determined by the underlying filesystem implementation, and thus changes from one filesystem to the next.

This was causing the template code to be produced with elements in a different order from one developer to the next. This did not result in any functional difference (or bug) in the template, but it did cause the template tests to fail because the the snapshot verification expects a fixed order.

Description of changes:

  • Sort the file listings from source/templates/examples/extensions/js_lambda_hooks, source/templates/examples/extensions/py_lambda_hooks, source/templates/examples/examples/js, and source/templates/examples/examples/py
  • Update the template snapshots to match the sorted order

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

The code previously produced CF code from a listing of files from the
fs.readdirSync function. The problem is that the order of the files
returned by fs.readdirSync is determined by the underlying filesystem
implementation, and thus changes from one filesystem to the next.

This was causing the template code to be produced with elements in a
different order from one developer to the next. This did not result
in any functional difference (or bug) in the template, but it did
cause the template tests to fail because the the snapshot verification
expects a fixed order.
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

Successfully merging this pull request may close these issues.

1 participant