<commit_before>var Flexio = require('../sdk-test-config')

test('Flexio.task.echo; test query string', async () => {

  var pipe = Flexio.pipe()
                   .javascript(function(context) {
                      context.output.write('Hello ' + context.query.name + '!')
                   })

  var response = await pipe.run({ query: { name: 'World' } })
  var result = response.text

  expect(result).toEqual("Hello World!")
})
<commit_msg>added test for posting JSON data<commit_after>var Flexio = require('../sdk-test-config')

test('Flexio.task.echo; test posting JSON data', async () => {

  var pipe = Flexio.pipe()
                   .javascript(function(context) {
                      context.output.write('Hello ' + context.form.name + '!')
                   })

  var response = await pipe.run({ data: { name: 'World' } })
  var result = response.text

  expect(result).toEqual("Hello World!")
})

{'fraction_non_alphanumeric': 0.15938864628820962, 'fraction_numerical': 0.0, 'mean_word_length': 2.408921933085502, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '951263', 'n_tokens_mistral': 277, 'n_tokens_neox': 260, 'n_words': 58}