Skip to content
This repository has been archived by the owner on Mar 26, 2021. It is now read-only.

Develop #103

Merged
merged 46 commits into from
Dec 10, 2018
Merged

Develop #103

merged 46 commits into from
Dec 10, 2018

Conversation

jgroom33
Copy link
Collaborator

@jgroom33 jgroom33 commented Nov 12, 2018

This is ready for review. It implements HAR as the schema.

  • Update README(s)
  • Add regex validation
validate:
- jsonpath: status
  regex: 2\d+
  • saved responses stored as har
...
    request:
      url: https://postman-echo.com/get
      method: GET
      queryString:
      - name: foo
        value: bar
  value2:
    request:
      url: https://postman-echo.com/get
      method: GET
      queryString:
      - name: baz
        value: <$ value1.content.args.foo $>

Resolve #94
Resolve #97
Resolve #22

bump version to 2.0.0
update docs
add regex to schema
fix type tests
add type tests
update docs
@jgroom33
Copy link
Collaborator Author

@shrikster could you help review this? I think it's ready for release, but would like you opinion.

@eykrehbein
Copy link
Owner

Reviewing tomorrow 👍 @jgroom33

Copy link
Contributor

@shrikster shrikster left a comment

Choose a reason for hiding this comment

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

You made a real progress seems like a huge step for us !!
I am still in middle of the review ..

src/handler.ts Outdated
console.log();
if(validateSchema.errors.length > 0) {
for (let erroredSchema of validateSchema.errors){
console.log(JSON.stringify(erroredSchema.details, null, 2));
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we should use console.error ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I updated this to use writeErrorMessage()

src/test.ts Outdated
})

nunjucksEnv.addGlobal('Env', function (envi: string) {
let environ = process.env[envi]
Copy link
Contributor

Choose a reason for hiding this comment

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

can be const

src/test.ts Show resolved Hide resolved
src/test.ts Outdated Show resolved Hide resolved
Copy link
Owner

@eykrehbein eykrehbein left a comment

Choose a reason for hiding this comment

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

I wondered what this required raw field in the Schema is about

@jgroom33
Copy link
Collaborator Author

The raw object allows the file to be parsed by nunjucks as each new response object is saved.
Roughly:

  1. Process raw with nunjucks
  2. Parse yaml
  3. Execute request and store response
  4. Repeat

This isn't really the way nunjucks was designed to be used, but it seems to work out.

@jgroom33
Copy link
Collaborator Author

@eykrehbein any other topics to discuss?

@jgroom33 jgroom33 merged commit c91387b into master Dec 10, 2018
@jgroom33 jgroom33 deleted the develop branch December 13, 2018 18:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants