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

assert.jsonFileContent testing if a key is set to anything. #28

Open
jhessin opened this issue Apr 9, 2018 · 0 comments
Open

assert.jsonFileContent testing if a key is set to anything. #28

jhessin opened this issue Apr 9, 2018 · 0 comments

Comments

@jhessin
Copy link

jhessin commented Apr 9, 2018

Hello,

I am new to unit testing but I want to check and make sure dependencies are being added properly by checking my package.json. I have this (coffeescript) code:

assert.jsonFileContent 'package.json',
  devDependencies:
    coffeescript: /\^\d\.\d\.\d/

to test if coffeescript is being added to the package.json, but it seems that this will always show up as true even if I intentionally break it. Is there a way to test if a key exists in a json file without knowing the exact value (as it changes regularly)?

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

No branches or pull requests

1 participant