{"id":15971140,"url":"https://github.com/heedrox/jest-plugin-yeelight","last_synced_at":"2026-03-03T16:08:50.032Z","repository":{"id":52965320,"uuid":"356800099","full_name":"heedrox/jest-plugin-yeelight","owner":"heedrox","description":"A Jest plugin to change yeelight smart lights based on test results. Make your room red when your tests are failing. Light it green when everything is ok","archived":false,"fork":false,"pushed_at":"2021-04-25T07:22:30.000Z","size":17,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-31T19:51:52.654Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/heedrox.png","metadata":{"files":{"readme":"README.md","changelog":"change-color-test.js","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-11T07:37:23.000Z","updated_at":"2021-04-25T07:22:32.000Z","dependencies_parsed_at":"2022-08-19T20:21:12.069Z","dependency_job_id":null,"html_url":"https://github.com/heedrox/jest-plugin-yeelight","commit_stats":null,"previous_names":["jmarti-theinit/jest-plugin-yeelight"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/heedrox/jest-plugin-yeelight","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heedrox%2Fjest-plugin-yeelight","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heedrox%2Fjest-plugin-yeelight/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heedrox%2Fjest-plugin-yeelight/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heedrox%2Fjest-plugin-yeelight/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heedrox","download_url":"https://codeload.github.com/heedrox/jest-plugin-yeelight/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heedrox%2Fjest-plugin-yeelight/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30051189,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T15:26:47.567Z","status":"ssl_error","status_checked_at":"2026-03-03T15:26:17.132Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-07T20:07:54.560Z","updated_at":"2026-03-03T16:08:50.007Z","avatar_url":"https://github.com/heedrox.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jest Plugin Yeelight\n\nA Jest plugin to change Yeelight Smart Light colors based on test results. When tests pass, your light turns green.\nWhen tests are failing, your light turns red.\n\nIt's a great complement to your twitch or youtube streamings. Please, if you use this in your streamings,\nit would be lovely if you gave me some credit, at least, once in a while.\n\nYeelight is the most common Xiaomi MI smart light.\n\nI use this in my streamings for: https://github.com/jmarti-theinit/escape-blackout\n\nYou can watch my streamings here! https://twitch.tv/itortv\n\n## Install\n\nBuy a Yeelight:\n\nhttps://amzn.to/3uCANyr \n\n(this uses amazon referee links, let me get some money at least with this XD)\n\nAdd the plugin:\n\n```\nnpm install jest-plugin-yeelight\n```\n\nAdd the plugin in your jest.config.js file, with the IP of your yeelight.\n\n```javascript\nmodule.exports = {\n  ...\n  watchPlugins: [ [ 'jest-plugin-yeelight', { ip: '192.168.1.56'} ]] ,\n  ...\n}\n```\n\nNow, when you run your tests in \"watch\" mode, the plugin is evaluated and your\nsmart light will change color based on the tests results. You need to execute your jest\ntests in watch mode. For example, if you use vue-cli-service with jest: \n\n```\nvue-cli-service test:unit --watch\n```\n\nFor this to work, you need to use \"miio\" to get the IP address and save the security token in memory.\n\n```\nnpx miio discovery\nnpx miio inspect (IPADDRESS)\nnpx miio tokens update (IPADDRESS) --token (YOUR_TOKEN)\n```\nMore information: https://github.com/aholstenson/miio#readme\n\nYou can use this to get the token of your yeelight:\n\nhttps://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor\n\nIn order to be able to publish your repo in Github, without others requiring to have a Yeelight, \nyou might want to do something like this in your jest.config.js:\n\n```javascript\nconst isYeelightInstalled = () =\u003e {\n  try {\n    require.resolve(\"jest-plugin-yeelight\");\n    console.log(\"jest-plugin-yeelight is installed. Yeelight will change per every test result :) .\");\n    return true;\n  } catch(e) {\n    console.log(\"jest-plugin-yeelight not installed. Yeelight will not change based on test results :( .\");\n    return false;\n  }\n};\n\nmodule.exports = {\n  ...\n  watchPlugins: isYeelightInstalled() ? [ [ 'jest-plugin-yeelight', { ip: '192.168.1.56'} ]] : [],\n}\n```\n\n## License\n\nPlease, if you use this in your streamings, it would be very kind of you\nto give me some credit, and tell your users you got this from https://twitch.tv/itortv\n\n### ISC License\n\nCopyright (c) 2021, Jordi Martí\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheedrox%2Fjest-plugin-yeelight","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheedrox%2Fjest-plugin-yeelight","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheedrox%2Fjest-plugin-yeelight/lists"}