algolia / algolia/jekyll-algolia

Writing unit test cases for jekyll plugins need to access the context.registers.

Open
#189 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
211
Forks
35
PR merge metrics
No merged PRs in 30d

Description

Hello ,
I am writing unit test cases for my jekyll plugins , where I need the site variable and context.registers .
I was able to get the site variable using the process used by jekyll-algolia plugin [link to jekyll-algolia spec_helper.rb](https://github.com/algolia/jekyll-algolia/blob/develop/spec/spec_helper.rb).
Is there a way i can also access the `@context.register` using the way got access to site variable?

Contributor guide

Open the contributing guide

Research direction

Start with the linked jekyll-algolia spec_helper.rb and compare how it obtains the site variable with the Jekyll context.registers access described in the issue. Check whether the existing test setup can expose the registers, and document or demonstrate a reproducible approach if one exists.

Written by the indexing model from the issue text.

Assessment

Tech stack
jekyll, ruby
Domain
testing, web-dev
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.