From 6711361c812b05ea7876f580c5a123c8bde28790 Mon Sep 17 00:00:00 2001 From: Fernando Cappi Date: Sat, 16 Jun 2018 01:02:44 -0300 Subject: [PATCH] Adjustments tests Signed-off-by: Fernando Cappi --- functions/gcs/test/index.test.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/functions/gcs/test/index.test.js b/functions/gcs/test/index.test.js index 16ee43d9345..01c6c15eba1 100644 --- a/functions/gcs/test/index.test.js +++ b/functions/gcs/test/index.test.js @@ -53,7 +53,7 @@ test.serial(`Fails without a bucket`, (t) => { const expectedMsg = `Bucket not provided. Make sure you have a "bucket" property in your request`; t.throws( - () => getSample().program.wordCount({ data: { name: `file` } }), + () => getSample().program.wordCount({ name: `file` }), Error, expectedMsg ); @@ -63,7 +63,7 @@ test.serial(`Fails without a file`, (t) => { const expectedMsg = `Filename not provided. Make sure you have a "file" property in your request`; t.throws( - () => getSample().program.wordCount({ data: { bucket: `bucket` } }), + () => getSample().program.wordCount({ bucket: `bucket` }), Error, expectedMsg ); @@ -71,9 +71,7 @@ test.serial(`Fails without a file`, (t) => { test.cb.serial(`Does nothing for deleted files`, (t) => { const event = { - data: { resourceState: `not_exists` - } }; const sample = getSample(); @@ -89,10 +87,8 @@ test.cb.serial(`Does nothing for deleted files`, (t) => { test.cb.serial(`Reads the file line by line`, (t) => { const expectedMsg = `File ${filename} has 114 words`; const event = { - data: { bucket: `bucket`, name: `sample.txt` - } }; const sample = getSample();