This guide assumes you've got a project using Detox with Jest, and you want to write your Detox tests in TypeScript.
- Refer to this guide if you need to set up such a project.
We'll be using ts-jest to run Jest tests with TypeScript.
#include <memory> | |
#include <string> | |
// Example allocator, doesn't do anything but implements std::allocator_traits | |
template<typename T> | |
struct null_allocator { | |
using value_type = T; | |
null_allocator() {} |
// a typescript implement of hindley-milner type inference | |
// reference http://smallshire.org.uk/sufficientlysmall/2010/04/11/a-hindley-milner-type-inference-implementation-in-python/ | |
/// <reference path="./lib.es6.d.ts" /> | |
// ... | |
interface AstNode { | |
} | |
class Id implements AstNode { |
# MIT License | |
# | |
# Copyright (c) 2017 Daniele Andreis <[email protected]> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
This guide assumes you've got a project using Detox with Jest, and you want to write your Detox tests in TypeScript.
We'll be using ts-jest to run Jest tests with TypeScript.
The big reason to do this is that LLDB has no ability to "follow-fork-mode child", in other words, a multi-process target that doesn't have a single-process mode (or, a bug that only manifests when in multi-process mode) is going to be difficult or impossible to debug, especially if you have to run the target over and over in order to make the bug manifest. If you have a repeatable bug, no big deal, break on the fork
from the parent process and attach to the child in a second lldb instance. Otherwise, read on.
Don't make the mistake of thinking you can just brew install gdb
. Currently this is version 10.2 and it's mostly broken, with at least two annoying bugs as of April 29th 2021, but the big one is https://sourceware.org/bugzilla/show_bug.cgi?id=24069
$ xcode-select install # install the XCode command-line tools