Skip to content

Instantly share code, notes, and snippets.

View costdev's full-sized avatar

Colin Stewart costdev

View GitHub Profile
@costdev
costdev / is_virtualbox.php
Last active March 30, 2022 03:48
A small WordPress plugin which attempts to detect VirtualBox.
<?php
/**
* Plugin Name: VirtualBox Detection.
* Description: Attempt to detect VirtualBox.
* Author: WordPress Core Contributors
* Author URI: https://make.wordpress.org/core
* License: GPLv2 or later.
* Version: 1.0.1
* Gist Plugin URI: https://gist.github.com/costdev/75138bbb72f77166e05cf49b5952f821
*/
  • The inclusion of _it_ seems unnecessary in the context of these isolated tests, UNLESS additional clarity is desired, in which case this should include the function name under test, which seems pretty common.

it is often used in JS tests/specs in the sense:

describe( 'disableBlockEditorForNavigationPostType', () => {
    // Some suites use "it"
    it( 'should only disable block editor for navigation post types',      () => {})
    // Some suites use "test"
    test( 'it should only disable block editor for navigation post types', () => {})
 // For suites using "test", removing "it" is common