Skip to content

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