generated from nvimdev/nvim-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4b7950c
commit 421cd84
Showing
10 changed files
with
66 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
return { | ||
_all = { | ||
coverage = false, | ||
lpath = 'lua/?.lua;lua/?/init.lua', | ||
lua = './test/busted.lua', | ||
}, | ||
default = { | ||
verbose = true, | ||
}, | ||
tests = { | ||
verbose = true, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.tests/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
drash-drash.nvim drash.txt /*drash-drash.nvim* | ||
drash-drash.nvim-development drash.txt /*drash-drash.nvim-development* | ||
drash-table-of-contents drash.txt /*drash-table-of-contents* | ||
drash.txt drash.txt /*drash.txt* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
local sefaria = require('drash.sefaria') | ||
_ = sefaria | ||
local M = {} | ||
|
||
M.setup = function(spec, opts) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
local plenary_curl = require('plenary.curl') | ||
|
||
local M = {} | ||
|
||
M.get_calendar = function() | ||
local url = 'https://www.sefaria.org/api/calendars' | ||
|
||
local response = plenary_curl.get(url) | ||
|
||
if response.status ~= 200 then | ||
return nil | ||
end | ||
|
||
local body = response.body | ||
local data = vim.json.decode(body) | ||
|
||
return data | ||
end | ||
|
||
return M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env -S nvim -l | ||
|
||
vim.env.LAZY_STDPATH = '.tests' | ||
load(vim.fn.system('curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua'))() | ||
|
||
-- Setup lazy.nvim | ||
require('lazy.minit').busted({ | ||
spec = { | ||
'nvim-lua/plenary.nvim', | ||
}, | ||
}) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
local sefaria = require('drash.sefaria') | ||
|
||
describe('sefaria', function() | ||
it('should return a table', function() | ||
assert.are.same(type(sefaria.get_calendar()), 'table') | ||
end) | ||
it('should return a table with a key of "calendar_items"', function() | ||
assert.are.same(type(sefaria.get_calendar().calendar_items), 'table') | ||
end) | ||
end) |