From 290ecba85263382d0fccf455b5efdde1175bf74f Mon Sep 17 00:00:00 2001 From: ray-x Date: Tue, 21 Feb 2023 11:14:03 +1100 Subject: [PATCH] github action & unit test updates --- lua/tests/go_test_spec.lua | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/lua/tests/go_test_spec.lua b/lua/tests/go_test_spec.lua index a595175..9a34271 100644 --- a/lua/tests/go_test_spec.lua +++ b/lua/tests/go_test_spec.lua @@ -58,7 +58,18 @@ describe('should run func test', function() vim.fn.setpos('.', { 0, 5, 11, 0 }) local cmd = require('go.gotest').test_func('-a', 'mock=true') - eq({ 'go', 'test', '-run', [['^Test_branch$']], './lua/tests/fixtures/coverage', '-args', 'mock=true' }, cmd) + eq( + { + 'go', + 'test', + '-run', + [['^Test_branch$']], + './lua/tests/fixtures/coverage', + '-args', + 'mock=true', + }, + cmd + ) end) end) @@ -105,7 +116,17 @@ describe('should run test file with flags', function() vim.fn.setpos('.', { 0, 5, 11, 0 }) local cmd = require('go.gotest').test_file('-t', 'tag1') - eq({ 'go', 'test', '-tags=tag1', '-run', [['Test_branch|TestBranch']], 'lua/tests/fixtures/coverage' }, cmd) + eq( + { + 'go', + 'test', + '-tags=tag1', + '-run', + [['Test_branch|TestBranch']], + 'lua/tests/fixtures/coverage', + }, + cmd + ) end) end) @@ -150,7 +171,10 @@ describe('should run test ', function() vim.fn.setpos('.', { 0, 6, 1, 0 }) local cmd = require('go.gotest').test('-n', '-t', 'tags1') - eq({ 'go', 'test', '-tags=tags1', '-run', [['^Test_branch$']], './lua/tests/fixtures/coverage' }, cmd) + eq( + { 'go', 'test', '-tags=tags1', '-run', [['^Test_branch$']], './lua/tests/fixtures/coverage' }, + cmd + ) end) end) @@ -202,7 +226,7 @@ describe('should run test file with flags inside file', function() 'test', '-tags=tag1,integration,unit', '-run', - 'TestTag', + [['TestTag']], 'lua/tests/fixtures/coverage', }, cmd) end)