Skip to content

Commit

Permalink
Vision snippets. (#294)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdobry authored and NimJay committed Nov 10, 2022
1 parent 604b58e commit 92b31de
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ test.before((t) => {
});
});

test.after((t) => {
test.after.always((t) => {
process.env.SLACK_TOKEN_PATH = originalToken;
try {
fs.unlinkSync(SLACK_TOKEN_PATH);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ test.before.cb((t) => {
});
});

test.after.cb((t) => {
test.after.cb.always((t) => {
fs.unlink(DB_PATH, (err) => {
if (err) {
t.end(err);
Expand Down
4 changes: 2 additions & 2 deletions cloud-language/snippets/system-test/analyze.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ test.before(async () => {
await bucket.upload(localFilePath);
});

test.after(async () => {
test.after.always(async () => {
const bucket = storage.bucket(bucketName);
await bucket.deleteFiles({ force: true });
await bucket.deleteFiles({ force: true }); // Try a second time...
await bucket.delete();
});

test.beforeEach(stubConsole);
test.afterEach(restoreConsole);
test.afterEach.always(restoreConsole);

test(`should run sync recognize`, async (t) => {
const output = await runAsync(`${cmd} sentiment-text "${text}"`, cwd);
Expand Down
2 changes: 1 addition & 1 deletion cloud-language/snippets/system-test/quickstart.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const proxyquire = require(`proxyquire`).noPreserveCache();
const language = proxyquire(`@google-cloud/language`, {})();

test.beforeEach(stubConsole);
test.afterEach(restoreConsole);
test.afterEach.always(restoreConsole);

test.cb(`should detect sentiment`, (t) => {
const expectedText = `Hello, world!`;
Expand Down

0 comments on commit 92b31de

Please sign in to comment.