# will produce lints
lint(
  text = "expect_equal(2, x)",
  linters = yoda_test_linter()
)
lint(
  text = 'expect_identical("a", x)',
  linters = yoda_test_linter()
)
# okay
lint(
  text = "expect_equal(x, 2)",
  linters = yoda_test_linter()
)
lint(
  text = 'expect_identical(x, "a")',
  linters = yoda_test_linter()
)
Run the code above in your browser using DataLab