Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F132001
init_spec.lua
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1004 B
Referenced Files
None
Subscribers
None
init_spec.lua
View Options
local
ivy
=
require
"ivy"
local
config
=
require
"ivy.config"
describe
(
"ivy.setup"
,
function
()
before_each
(
function
()
ivy
.
has_setup
=
false
config
.
user_config
=
{}
end
)
it
(
"sets the users config options"
,
function
()
ivy
.
setup
{
backends
=
{
"ivy.backends.files"
}
}
assert
.
is_equal
(
"ivy.backends.files"
,
config
:
get
{
"backends"
,
1
})
end
)
it
(
"will not reconfigure if its called twice"
,
function
()
ivy
.
setup
{
backends
=
{
"ivy.backends.files"
}
}
ivy
.
setup
{
backends
=
{
"some.backend"
}
}
assert
.
is_equal
(
"ivy.backends.files"
,
config
:
get
{
"backends"
,
1
})
end
)
it
(
"does not crash if you don't pass in any params to the setup function"
,
function
()
ivy
.
setup
()
assert
.
is_equal
(
"ivy.backends.buffers"
,
config
:
get
{
"backends"
,
1
})
end
)
it
(
"will fallback if the key is not set at all in the users config"
,
function
()
ivy
.
setup
{
some_key
=
"some_value"
}
assert
.
is_equal
(
"ivy.backends.buffers"
,
config
:
get
{
"backends"
,
1
})
end
)
end
)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Apr 6 2026, 6:50 PM (5 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
10589
Default Alt Text
init_spec.lua (1004 B)
Attached To
Mode
R1 ivy.nvim
Attached
Detach File
Event Timeline
Log In to Comment