diff --git a/autoload/fern/internal/node.vim b/autoload/fern/internal/node.vim index d27d080..45b87ad 100644 --- a/autoload/fern/internal/node.vim +++ b/autoload/fern/internal/node.vim @@ -208,8 +208,7 @@ function! fern#internal#node#reveal(key, nodes, provider, comparator, token) abo if node is# v:null || node.status is# s:STATUS_NONE return s:Promise.resolve(a:nodes) endif - return fern#internal#node#collapse(node, a:nodes, a:provider, a:comparator, a:token) - \.then({ ns -> s:expand_recursively(0, a:key, ns, a:provider, a:comparator, a:token) }) + return s:expand_recursively(0, a:key, a:nodes, a:provider, a:comparator, a:token) \.finally({ -> Profile() }) endfunction diff --git a/test/fern/internal/node.vimspec b/test/fern/internal/node.vimspec index f5176e5..6ed8b43 100644 --- a/test/fern/internal/node.vimspec +++ b/test/fern/internal/node.vimspec @@ -395,7 +395,7 @@ Describe fern#internal#node \]) let [r, e] = Promise.wait( - \ fern#internal#node#reveal(['deep', 'alpha'], nodes, provider, Comparator, token), + \ fern#internal#node#reveal(['deep', 'alpha'], r, provider, Comparator, token), \ { 'timeout': TIMEOUT }, \) Assert Equals(e, v:null) @@ -410,7 +410,7 @@ Describe fern#internal#node \]) let [r, e] = Promise.wait( - \ fern#internal#node#reveal(['deep', 'alpha', 'beta'], nodes, provider, Comparator, token), + \ fern#internal#node#reveal(['deep', 'alpha', 'beta'], r, provider, Comparator, token), \ { 'timeout': TIMEOUT }, \) Assert Equals(e, v:null) @@ -426,7 +426,7 @@ Describe fern#internal#node \]) let [r, e] = Promise.wait( - \ fern#internal#node#reveal(['deep', 'alpha', 'beta', 'gamma'], nodes, provider, Comparator, token), + \ fern#internal#node#reveal(['deep', 'alpha', 'beta', 'gamma'], r, provider, Comparator, token), \ { 'timeout': TIMEOUT }, \) Assert Equals(e, v:null) @@ -442,7 +442,7 @@ Describe fern#internal#node \]) let [r, e] = Promise.wait( - \ fern#internal#node#reveal(['deep', 'alpha', 'beta', 'gamma', 'UNKNOWN'], nodes, provider, Comparator, token), + \ fern#internal#node#reveal(['deep', 'alpha', 'beta', 'gamma', 'UNKNOWN'], r, provider, Comparator, token), \ { 'timeout': TIMEOUT }, \) Assert Equals(e, v:null) @@ -492,7 +492,7 @@ Describe fern#internal#node \]) let [r, e] = Promise.wait( - \ fern#internal#node#reveal(['deep', 'alpha'], nodes, provider, Comparator, token), + \ fern#internal#node#reveal(['deep', 'alpha'], r, provider, Comparator, token), \ { 'timeout': TIMEOUT }, \) Assert Equals(e, v:null) @@ -507,7 +507,7 @@ Describe fern#internal#node \]) let [r, e] = Promise.wait( - \ fern#internal#node#reveal(['deep', 'alpha', 'beta'], nodes, provider, Comparator, token), + \ fern#internal#node#reveal(['deep', 'alpha', 'beta'], r, provider, Comparator, token), \ { 'timeout': TIMEOUT }, \) Assert Equals(e, v:null) @@ -523,7 +523,7 @@ Describe fern#internal#node \]) let [r, e] = Promise.wait( - \ fern#internal#node#reveal(['deep', 'alpha', 'beta', 'gamma'], nodes, provider, Comparator, token), + \ fern#internal#node#reveal(['deep', 'alpha', 'beta', 'gamma'], r, provider, Comparator, token), \ { 'timeout': TIMEOUT }, \) Assert Equals(e, v:null) @@ -539,7 +539,7 @@ Describe fern#internal#node \]) let [r, e] = Promise.wait( - \ fern#internal#node#reveal(['deep', 'alpha', 'beta', 'gamma', 'UNKNOWN'], nodes, provider, Comparator, token), + \ fern#internal#node#reveal(['deep', 'alpha', 'beta', 'gamma', 'UNKNOWN'], r, provider, Comparator, token), \ { 'timeout': TIMEOUT }, \) Assert Equals(e, v:null)