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

Remove nonEmptyOrFail function from recent tests #1237

Merged
merged 4 commits into from
Apr 26, 2021

Conversation

danbroooks
Copy link
Contributor

@danbroooks danbroooks commented Apr 20, 2021

Before submitting your PR, check that you've:

  • Documented new APIs with Haddock markup
  • Added @since declarations to the Haddock
  • Ran stylish-haskell on any changed files.
  • Adhered to the code style (see the .editorconfig file for details)

After submitting your PR:

  • Update the Changelog.md file with a link to your PR
  • Bumped the version number if there isn't an (unreleased) on the Changelog
  • Check that CI passes (or if it fails, for reasons unrelated to your change, like CI timeouts)

Removes the nonEmptyOrFail function in favour of making use of OverloadedLists after changes in #1231

@@ -54,32 +54,36 @@ main = hspec $ do
`shouldBe`
( [NEL.toList helloWorldTokens, NEL.toList foobarbazTokens], mempty )
it "works4" $ do
let foobarbarz = ["foo", "Bar", "baz"]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These were also causing some type ambiguity errors, where with OverloadedLists we want to use this value here both as a [Text] and NonEmpty Text, so I have opted to re-writing the test with literals rather than trying to re-use the values. I've tried to include some more realworld looking values too while changing things here.

@danbroooks danbroooks marked this pull request as draft April 20, 2021 22:15
@danbroooks danbroooks marked this pull request as ready for review April 21, 2021 18:14
Copy link
Collaborator

@parsonsmatt parsonsmatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great thanks!

@parsonsmatt parsonsmatt merged commit 2fd0e9b into yesodweb:master Apr 26, 2021
@danbroooks danbroooks deleted the simplify-line-test-cleanup branch April 27, 2021 16:17
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.

None yet

2 participants